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 |
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, optional | json for text frames or msgpack for binary frames. |
maxint, optional | Maximum incoming UTF-8 or binary byte length. |
| Returns | |
None | Prepare the selected protocol codec. |
| Raises | |
ValueError | If the codec is unknown or the message limit is not a positive, nonboolean integer. |
Decode and validate one client envelope from a complete socket message.
| Parameters | |
message:WebSocketMessage | Text JSON or binary MessagePack message selected by the route. |
| Returns | |
ClientMessage | Strict typed request, completion, cancellation or ping/pong. |
| Raises | |
ProtocolError | If frame kind, size, fields or structural limits are invalid. |