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.

module documentation

Describe one pre-authorized method without retaining a Hub instance.

Class _ClientParameter Retain the immutable conversion plan for one client-owned parameter.
Class RemoteMethod Describe one pre-authorized method without retaining a Hub instance.
Function _base_annotation Remove metadata wrappers when classifying trusted annotations.
Function _dependency_type Extract a container-owned service type, including nullable dependencies.
Function _is_data Identify types whose values may safely originate in decoded client data.
Function _method_plan Compile trusted reflection metadata once, rejecting ambiguous signatures.
Function compile_hub Build the immutable remote dispatch map exclusively from class metadata.
Constant _ARGUMENTS_MESSAGE Invalid arguments.
Constant _COLLECTIONS Collections used by metadata.
Constant _INVALID_ARGUMENTS invalid_arguments.
Constant _SCALARS Scalars used by metadata.
Constant _VALIDATION_ERROR Protocol error code returned when invocation arguments fail validation.
def _base_annotation(annotation: object) -> object: (source)

Remove metadata wrappers when classifying trusted annotations.

Parameters
annotation:objectResolved developer-owned annotation.
Returns
objectUnderlying annotation, preserving optionality and container parameters.
def _dependency_type(annotation: object) -> type | None: (source)

Extract a container-owned service type, including nullable dependencies.

Parameters
annotation:objectResolved trusted annotation.
Returns
type | NoneConcrete or abstract service type, or None for client data/unsupported hints.
def _is_data(annotation: object) -> bool: (source)

Identify types whose values may safely originate in decoded client data.

Parameters
annotation:objectResolved callable annotation.
Returns
boolWhether the type is a scalar, schema, enum or typed data collection.
def _method_plan(hub: type[Hub], name: str, function: FunctionType) -> RemoteMethod: (source)

Compile trusted reflection metadata once, rejecting ambiguous signatures.

Parameters
hub:type[orionis.realtime.Hub]Registered hub class.
name:strServer-owned Python method name.
function:types.FunctionTypeOriginal decorated function.
Returns
orionis.realtime.metadata.RemoteMethodComplete safe binding and dispatch plan.
Raises
TypeErrorIf annotations cannot be resolved or a signature is unsupported.
@lru_cache(maxsize=1024)
def compile_hub(hub: type[Hub]) -> Mapping[str, RemoteMethod]: (source)

Build the immutable remote dispatch map exclusively from class metadata.

Parameters
hub:type[orionis.realtime.Hub]Developer-owned Hub subclass registered during application boot.
Returns
collections.abc.Mapping[str, orionis.realtime.metadata.RemoteMethod]Bounded cached dispatch map; no instance or payload is retained.
Raises
TypeErrorIf a remote descriptor, method or annotation is unsupported.
ValueErrorIf aliases conflict or a private method is marked remote.
_ARGUMENTS_MESSAGE: str = (source)

Invalid arguments.

Value
'Invalid arguments'
_COLLECTIONS = (source)

Collections used by metadata.

Value
frozenset(set([list, tuple, dict, set, frozenset, Sequence, Mapping]))
_INVALID_ARGUMENTS: str = (source)

invalid_arguments.

Value
'invalid_arguments'
_SCALARS = (source)

Scalars used by metadata.

Value
frozenset(set([str,
               int,
               float,
               bool,
               bytes,
               object,
               type(None),
...
_VALIDATION_ERROR: str = (source)

Protocol error code returned when invocation arguments fail validation.

Value
'validation_error'