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

Encode Orionis Realtime v1 using route-selected JSON or MessagePack.

Method __init__ Prepare reusable msgspec codecs without connection or task ownership.
Method decode Decode and validate one client envelope from a complete socket message.
Method encode Encode an outgoing envelope once for direct send or broadcast reuse.
Class Variable __slots__ Undocumented
Instance Variable _decoder Undocumented
Instance Variable _encoder Undocumented
Instance Variable _max_message_size Undocumented
Instance Variable name Undocumented
def __init__(self, name: str = 'json', *, max_message_size: int = _DEFAULT_MESSAGE_LIMIT): (source)

Prepare reusable msgspec codecs without connection or task ownership.

Parameters
name:str, optionaljson for text frames or msgpack for binary frames.
max_message_size:int, optionalMaximum incoming UTF-8 or binary byte length.
Returns
NonePrepare the selected protocol codec.
Raises
ValueErrorIf the codec is unknown or the message limit is not a positive, nonboolean integer.
def decode(self, message: WebSocketMessage) -> ClientMessage: (source)

Decode and validate one client envelope from a complete socket message.

Parameters
message:WebSocketMessageText JSON or binary MessagePack message selected by the route.
Returns
ClientMessageStrict typed request, completion, cancellation or ping/pong.
Raises
ProtocolErrorIf frame kind, size, fields or structural limits are invalid.
def encode(self, message: object) -> str | bytes: (source)

Encode an outgoing envelope once for direct send or broadcast reuse.

Parameters
message:objectFramework-owned envelope containing a serializable result or event.
Returns
str | bytesText JSON or binary MessagePack payload.
Raises
TypeErrorIf an application result cannot be encoded.
__slots__: tuple[str, ...] = (source)

Undocumented

_decoder = (source)

Undocumented

_encoder = (source)

Undocumented

_max_message_size = (source)

Undocumented

Undocumented