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 ClientTarget: (source)
Constructor: ClientTarget(manager, hub, connection_ids, group, ...)
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__ |
Undocumented |
| Instance Variable | _excluded |
Undocumented |
| Instance Variable | _group |
Undocumented |
| Instance Variable | _hub |
Undocumented |
| Instance Variable | _ids |
Undocumented |
| Instance Variable | _manager |
Undocumented |
| Instance Variable | _single |
Undocumented |
def __init__(self, manager:
IConnectionManager, hub: type[ 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:IConnectionManager | Registry owning local connections. |
hub:type[Hub] | Namespace limiting every selected recipient. |
connectiontuple[str, ...] | str | None, optional | A single recipient, multiple recipients, or None for all/group members. |
group:str | None, optional | Hub-local group to select when no identifiers are supplied. |
excluded:str | None, optional | Connection to omit from an all-connections or group selection. |
| Returns | |
None | Store the selection without validating or resolving recipients. |
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 | |
ValueError | If 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:str | Public client method name. |
*args:object | Up to 64 positional values supplied to the client method. |
timeout:float | None, optional | Total send/result deadline in seconds, or None to use the connection's configured client-result timeout. |
| Returns | |
object | Result supplied by the selected client, including None. |
| Raises | |
RuntimeError | If the selection is not a single-client target or the pending client-result budget is exhausted. |
ConnectionError | If the client is unavailable in this Hub namespace or disconnects. |
ValueError | If the target, argument count or deadline is invalid. |
TimeoutError | If sending or receiving the completion exceeds the deadline. |
ClientInvocationError | If the client returns a completion error. |
Deliver a client event and report per-recipient delivery outcomes.
| Parameters | |
target:str | Public client event or method name. |
*args:object | Up to 64 positional values encoded into the event envelope. |
| Returns | |
BroadcastResult | Counts of successful and failed deliveries; no offline persistence. |
| Raises | |
ValueError | If the target, argument count, selected group name or event envelope is invalid. |
TypeError | If the event envelope contains values unsupported by the codec. |