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

Provide mcp operations through mime_format, Progress, McpResponse.

Class Progress A request-scoped progress update awaiting a client-provided token.
Function _encode_payload Serialize application data with the selected native msgspec codec.
Function mime_format Select a structured content codec without changing the declared MIME type.
Constant _JSON_MIME_TYPE application/json.
Constant _MSGPACK_MIME_TYPES Msgpack mime types used by responses.
def _encode_payload(value: object, payload_format: Literal['json', 'msgpack'] | None) -> bytes: (source)

Serialize application data with the selected native msgspec codec.

Parameters
value:objectApplication data to serialize without modifying the original value.
payload_format:typing.Literal["json", "msgpack"] | NoneCodec selected from the response MIME type.
Returns
bytesEncoded JSON or MessagePack content.
Raises
ValueErrorIf JSON data is unsupported or invalid, or the MIME type has no structured codec.
def mime_format(mime_type: str | None) -> Literal['json', 'msgpack'] | None: (source)

Select a structured content codec without changing the declared MIME type.

Parameters
mime_type:str | NoneMedia type, optionally containing parameters or a structured suffix.
Returns
typing.Literal["json", "msgpack"] | NoneSupported codec, JSON by default, or None for another media type.
_JSON_MIME_TYPE: str = (source)

application/json.

Value
'application/json'
_MSGPACK_MIME_TYPES = (source)

Msgpack mime types used by responses.

Value
frozenset(set(['application/msgpack',
               'application/x-msgpack',
               'application/vnd.msgpack']))