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 | |
A request-scoped progress update awaiting a client-provided token. |
| Function | _encode |
Serialize application data with the selected native msgspec codec. |
| Function | mime |
Select a structured content codec without changing the declared MIME type. |
| Constant | _JSON |
application/json. |
| Constant | _MSGPACK |
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:object | Application data to serialize without modifying the original value. |
payloadtyping.Literal["json", "msgpack"] | None | Codec selected from the response MIME type. |
| Returns | |
bytes | Encoded JSON or MessagePack content. |
| Raises | |
ValueError | If JSON data is unsupported or invalid, or the MIME type has no structured codec. |
Select a structured content codec without changing the declared MIME type.
| Parameters | |
mimestr | None | Media type, optionally containing parameters or a structured suffix. |
| Returns | |
typing.Literal["json", "msgpack"] | None | Supported codec, JSON by default, or None for another media type. |