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

Send to a Hub-local selection or invoke one explicitly selected client.

Method __init__ Store a connection selection without retaining connection objects.
Method _recipients Snapshot the identifiers selected for Hub-local delivery.
Async Method invoke Invoke one selected client and await its correlated completion.
Async Method send Deliver a client event and report per-recipient delivery outcomes.
Class Variable __slots__ Declare the instance attribute slots reserved by this class.
Instance Variable _excluded Connection to omit from an all-connections or group selection.
Instance Variable _group Hub-local group to select when no identifiers are supplied.
Instance Variable _hub Namespace limiting every selected recipient.
Instance Variable _ids Connection identifiers selected as the client invocation targets.
Instance Variable _manager Registry owning local connections.
Instance Variable _single Single produced by isinstance.
def __init__(self, manager: IConnectionManager, hub: type[hub_module.Hub], *, connection_ids: tuple[str, ...] | str | None = None, group: str | None = None, excluded: str | None = None): (source)

Store a connection selection without retaining connection objects.

Parameters
manager:orionis.realtime.contracts.IConnectionManagerRegistry owning local connections.
hub:type[orionis.realtime.Hub]Namespace limiting every selected recipient.
connection_ids:tuple[str, ...] | str | None, optionalA single recipient, multiple recipients, or None for all/group members.
group:str | None, optionalHub-local group to select when no identifiers are supplied.
excluded:str | None, optionalConnection to omit from an all-connections or group selection.
Returns
NoneStore the selection without validating or resolving recipients.
def _recipients(self) -> tuple[str, ...]: (source)

Snapshot the identifiers selected for Hub-local delivery.

Returns
tuple[str, ...]Explicit identifiers unchanged, or current ready all/group members with the excluded connection omitted.
Raises
ValueErrorIf a selected group name is invalid.
async def invoke(self, target: str, *args: object, timeout: float | None = None) -> object: (source)

Invoke one selected client and await its correlated completion.

Parameters
target:strPublic client method name.
*args:objectUp to 64 positional values supplied to the client method.
timeout:float | None, optionalTotal send/result deadline in seconds, or None to use the connection's configured client-result timeout.
Returns
objectResult supplied by the selected client, including None.
Raises
RuntimeErrorIf the selection is not a single-client target or the pending client-result budget is exhausted.
ConnectionErrorIf the client is unavailable in this Hub namespace or disconnects.
ValueErrorIf the target, argument count or deadline is invalid.
TimeoutErrorIf sending or receiving the completion exceeds the deadline.
orionis.realtime.errors.ClientInvocationErrorIf the client returns a completion error.
async def send(self, target: str, *args: object) -> BroadcastResult: (source)

Deliver a client event and report per-recipient delivery outcomes.

Parameters
target:strPublic client event or method name.
*args:objectUp to 64 positional values encoded into the event envelope.
Returns
orionis.realtime.BroadcastResultCounts of successful and failed deliveries; no offline persistence.
Raises
ValueErrorIf the target, argument count, selected group name or event envelope is invalid.
TypeErrorIf the event envelope contains values unsupported by the codec.
__slots__: tuple[str, ...] = (source)

Declare the instance attribute slots reserved by this class.

_excluded = (source)

Connection to omit from an all-connections or group selection.

Hub-local group to select when no identifiers are supplied.

Namespace limiting every selected recipient.

_ids: tuple[str, ...] | None = (source)

Connection identifiers selected as the client invocation targets.

_manager = (source)

Registry owning local connections.

Single produced by isinstance.