THE ORIONIS API
Build with clarity.
Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.
class documentation
class _Broadcast: (source)
Constructor: _Broadcast(manager, hub, recipients, encoded)
Share one immutable encoded payload per codec among bounded workers.
| Method | __init__ |
Share recipient iteration, encoded frames, and counters across workers. |
| Async Method | run |
Drain the shared recipient iterator and count per-connection outcomes. |
| Class Variable | __slots__ |
Declare the instance attribute slots reserved by this class. |
| Instance Variable | encoded |
Immutable frame payloads, encoded once per selected codec. |
| Instance Variable | failed |
Failed value used by _Broadcast. |
| Instance Variable | hub |
Hub namespace restricting all recipients. |
| Instance Variable | manager |
Registry used to recheck availability immediately before sending. |
| Instance Variable | recipients |
Snapshot of recipient identifiers; no connections are retained. |
| Instance Variable | sent |
Sent value used by _Broadcast. |
def __init__(self, manager:
IConnectionManager, hub: type[ Hub], recipients: tuple[ str, ...], encoded: dict[ str, str | bytes]):
(source)
¶
Share recipient iteration, encoded frames, and counters across workers.
| Parameters | |
manager:orionis.realtime.contracts.manager.IConnectionManager | Registry used to recheck recipient availability before each send. |
hub:type[orionis.realtime.Hub] | Hub namespace that every recipient must belong to. |
recipients:tuple[str, ...] | Recipient identifier snapshot shared by all delivery workers. |
encoded:dict[str, str | bytes] | Frame values shared across workers, encoded once per selected codec. |
| Returns | |
None | Retain delivery inputs and initialize shared sent/failed counters. |
Drain the shared recipient iterator and count per-connection outcomes.
| Returns | |
None | Count completed sends and failed or unavailable recipients, continuing after ordinary delivery exceptions. |
| Raises | |
asyncio.CancelledError | If the worker is cancelled; retain counts for completed recipients. |