Skip to content

Update base

UpdateType = TypeVar('UpdateType', bound=Update) module-attribute

logger = logging.getLogger(__name__) module-attribute

UpdatableProtocol

Bases: Protocol

Protocol for an async callable that can accept updates.

Examples:

async def example_updatable(updates: list[Update]) -> None:
    print("Applying updates", updates)

__call__(updates) async

Update dataclass

Base class for updates to propagate up to Controller/Frontend/Anything else.

Subclass to add specific fields.

__init__()