API Reference
Events for asyncio
- class aioevents.Event(doc: str | None = None)[source]
An event that an object may fire.
Acts as a set for registered events.
Acts as a property descriptor, producing
BoundEvent
- handler(callable, *, weak: bool = False)
Registers a handler.
If
weak
is True, keep a weakref to the handler instead of a strong one.- Parameters:
callable – Function to call when event is emitted.
weak – Should we keep a strong or weak ref?