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__ |
Undocumented |
| Instance Variable | _caller |
Undocumented |
| Instance Variable | _hub |
Undocumented |
| Instance Variable | _manager |
Undocumented |
| 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], caller_id: str | None = None):
(source)
¶
Bind Hub-local client selection to an optional caller.
| Parameters | |
manager:IConnectionManager | Registry owning the connections. |
hub:type[Hub] | Hub namespace selecting eligible clients. |
callerstr | None, optional | Current connection identifier; absent for application services. |
| Returns | |
None | Store the registry, Hub namespace and optional caller identifier. |
Require a connection-specific caller identifier.
| Returns | |
str | Calling connection's identifier. |
| Raises | |
RuntimeError | If this proxy was created outside a Hub connection. |
Select one connection for event delivery or bidirectional invocation.
| Parameters | |
connectionstr | Identifier belonging to a connection in this Hub. |
| Returns | |
ClientTarget | Single recipient target; unavailable recipients fail on delivery. |
| Raises | |
ValueError | If the identifier is empty, non-string or longer than 128 characters. |
Select explicit recipients, preserving order and removing duplicates.
| Parameters | |
connectionIterable[str] | Connection identifiers belonging to this Hub. |
| Returns | |
ClientTarget | Multi-recipient target supporting event delivery. |
| Raises | |
TypeError | If the input is a string, bytes or a noniterable value. |
ValueError | If any identifier is invalid. |
Select a named group within this Hub namespace.
| Parameters | |
name:str | Nonempty group name, at most 256 characters. |
| Returns | |
ClientTarget | Target resolving current group membership at delivery time. |
| Raises | |
ValueError | If the name is empty, non-string or longer than 256 characters. |
Return a target for every ready connection to this Hub.
| Returns | |
ClientTarget | Target resolving ready Hub connections at delivery time. |
Return a target for the calling connection.
| Returns | |
ClientTarget | Single-client target supporting event delivery and invocation. |
| Raises | |
RuntimeError | If this proxy was created outside a Hub connection. |
ValueError | If the caller identifier is invalid. |
Return a target excluding the calling connection.
| Returns | |
ClientTarget | Target resolving other ready Hub connections at delivery time. |
| Raises | |
RuntimeError | If this proxy was created outside a Hub connection. |