Skip to content

AsyncFilterPhase

Bases: AsyncBuildPhase

Async counterpart of FilterPhase. Narrows a subscription to a category or a set of event types.

Source code in event_sourcery/_event_store/_async/subscription.py
class AsyncFilterPhase(AsyncBuildPhase):
    """
    Async counterpart of `FilterPhase`. Narrows a subscription to a category
    or a set of event types.
    """

    def to_category(self, category: StreamCategory) -> AsyncBuildPhase:
        raise NotImplementedError()

    def to_events(self, events: list[type[Event]]) -> AsyncBuildPhase:
        raise NotImplementedError()