Skip to content

Frontend updater

logger = logging.getLogger(__name__) module-attribute

AbstractFrontendUpdatable

Bases: UpdatableProtocol, ABC

pending_events = asyncio.Queue() instance-attribute

state_updater = state_updater instance-attribute

update_mapping abstractmethod property

Mapping of Update classes to the function that applies them.

__call__(updates) async

__init__(state_updater)

get_all_events()

NotificationUpdate dataclass

Bases: Update

Update that will directly be converted to a frontend notification.

Note: This will not be passed to any updatable states, the notification will be extracted directly.

message instance-attribute

__init__(message)

YieldEventsFromUpdatableDuringTask

Bases: AsyncIterator

Helper to yield events from an updatable that is updated during the coro execution.

Ensures that when the coro is done executing, remaining events are yielded before returning StopAsyncIteration. Automatically stops yielding events when the coro is done executing. (max wait time is next_event_timeout)

next_event_timeout = next_event_timeout instance-attribute

task = task instance-attribute

updatable = updatable instance-attribute

__aiter__()

__anext__() async

__init__(updatable, task, next_event_timeout=0.1)