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 protocol operations.
Includes decode_envelope, decode_params, encode_error.
| Function | decode |
Parse a single UTF-8 JSON-RPC message without decoding its payload. |
| Function | decode |
Validate method-specific parameters and per-request metadata. |
| Function | encode |
Serialize only explicitly public exception fields. |
| Constant | _ENVELOPE |
Envelope used by codecs. |
| Constant | METHOD |
Method decoders used by codecs. |
Parse a single UTF-8 JSON-RPC message without decoding its payload.
| Parameters | |
data:bytes | Value supplied for data. |
| Returns | |
orionis.mcp.protocol.requests.JsonRpcRequest | Result of the operation described above. |
Validate method-specific parameters and per-request metadata.
| Parameters | |
request:orionis.mcp.protocol.requests.JsonRpcRequest | Current request and its trusted execution context. |
| Returns | |
orionis.mcp.protocol.requests.RequestParams | Result of the operation described above. |
def encode_error(exception:
McpProtocolException, request_id: str | int | msgspec.UnsetType = msgspec.UNSET) -> bytes:
(source)
¶
Serialize only explicitly public exception fields.
| Parameters | |
exception:orionis.mcp.exceptions.McpProtocolException | Exception being inspected or reported. |
requeststr | int | msgspec.UnsetType | Value supplied for request_id. |
| Returns | |
bytes | Result of the operation described above. |
Method decoders used by codecs.
| Value |
|