ORIONIS API REFERENCE

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

Select ready clients within one Hub in the current worker.

Method __init__ Bind Hub-local client selection to an optional caller.
Method _caller Require a connection-specific caller identifier.
Method client Select one connection for event delivery or bidirectional invocation.
Method clients Select explicit recipients, preserving order and removing duplicates.
Method group Select a named group within this Hub namespace.
Class Variable __slots__ Declare the instance attribute slots reserved by this class.
Instance Variable _caller_id Current connection identifier; absent for application services.
Instance Variable _hub Hub namespace selecting eligible clients.
Instance Variable _manager Registry owning the connections.
Property all Return a target for every ready connection to this Hub.
Property caller Return a target for the calling connection.
Property others Return a target excluding the calling connection.
def __init__(self, manager: IConnectionManager, hub: type[hub_module.Hub], caller_id: str | None = None): (source)

Bind Hub-local client selection to an optional caller.

Parameters
manager:orionis.realtime.contracts.IConnectionManagerRegistry owning the connections.
hub:type[orionis.realtime.Hub]Hub namespace selecting eligible clients.
caller_id:str | None, optionalCurrent connection identifier; absent for application services.
Returns
NoneStore the registry, Hub namespace and optional caller identifier.
def _caller(self) -> str: (source)

Require a connection-specific caller identifier.

Returns
strCalling connection's identifier.
Raises
RuntimeErrorIf this proxy was created outside a Hub connection.
def client(self, connection_id: str) -> ClientTarget: (source)

Select one connection for event delivery or bidirectional invocation.

Parameters
connection_id:strIdentifier belonging to a connection in this Hub.
Returns
orionis.realtime.clients.ClientTargetSingle recipient target; unavailable recipients fail on delivery.
Raises
ValueErrorIf the identifier is empty, non-string or longer than 128 characters.
def clients(self, connection_ids: Iterable[str]) -> ClientTarget: (source)

Select explicit recipients, preserving order and removing duplicates.

Parameters
connection_ids:collections.abc.Iterable[str]Connection identifiers belonging to this Hub.
Returns
orionis.realtime.clients.ClientTargetMulti-recipient target supporting event delivery.
Raises
TypeErrorIf the input is a string, bytes or a noniterable value.
ValueErrorIf any identifier is invalid.
def group(self, name: str) -> ClientTarget: (source)

Select a named group within this Hub namespace.

Parameters
name:strNonempty group name, at most 256 characters.
Returns
orionis.realtime.clients.ClientTargetTarget resolving current group membership at delivery time.
Raises
ValueErrorIf the name is empty, non-string or longer than 256 characters.
__slots__: tuple[str, ...] = (source)

Declare the instance attribute slots reserved by this class.

_caller_id = (source)

Current connection identifier; absent for application services.

Hub namespace selecting eligible clients.

_manager = (source)

Registry owning the connections.

all: ClientTarget = (source)

Return a target for every ready connection to this Hub.

Returns
orionis.realtime.clients.ClientTargetTarget resolving ready Hub connections at delivery time.
caller: ClientTarget = (source)

Return a target for the calling connection.

Returns
orionis.realtime.clients.ClientTargetSingle-client target supporting event delivery and invocation.
Raises
RuntimeErrorIf this proxy was created outside a Hub connection.
ValueErrorIf the caller identifier is invalid.
others: ClientTarget = (source)

Return a target excluding the calling connection.

Returns
orionis.realtime.clients.ClientTargetTarget resolving other ready Hub connections at delivery time.
Raises
RuntimeErrorIf this proxy was created outside a Hub connection.