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

Undocumented

Class HeaderBinding One statically reachable argument mirrored into a lowercase HTTP header.
Function _argument Read the exact compiled property path without interpreting dotted keys.
Function _binding Validate the name and primitive type at one reachable property.
Function _contains_annotation Locate annotations even inside unsupported schema constructs.
Function _decode_value Validate ASCII transport syntax and decode the exact Base64 sentinel.
Function _matches_integer Compare safe JSON integers numerically, accepting equivalent 42.0 values.
Function _matches_value Compare mirrored parameters without coercing booleans into integers.
Function _mismatch Report the failing header without reflecting untrusted field values.
Function _parameter Read either decoded protocol structs or an unknown method's raw mapping.
Function _single_header Require one field occurrence, including case-insensitive duplicates.
Function _validate_binding Require mirrored values precisely when their argument is present and non-null.
Function _validate_standard Compare one required standard header with its corresponding body field.
Function _validate_version Distinguish invalid body metadata from a missing or disagreeing header.
Function _walk_properties Visit named object properties with statically known extraction paths.
Function _walk_schema Visit properties chains and reject annotations hidden elsewhere.
Function compile_header_bindings Validate tool schema annotations once and freeze extraction paths.
Function validate_headers Enforce mirrored request metadata before protocol method dispatch.
Constant _ANNOTATION Undocumented
Constant _NAMED_METHODS Undocumented
Constant _NUMBER Undocumented
Constant _PLAIN Undocumented
Constant _PREFIX Undocumented
Constant _SAFE_INTEGER Undocumented
Constant _SUFFIX Undocumented
Constant _TOKEN Undocumented
def _argument(arguments: object, path: tuple[str, ...]) -> object: (source)

Read the exact compiled property path without interpreting dotted keys.

Parameters
arguments:objectArguments supplied for this operation.
path:tuple[str, ...]Value supplied for path.
Returns
objectResult of the operation described above.
def _binding(schema: Mapping[str, object], path: tuple[str, ...]) -> HeaderBinding: (source)

Validate the name and primitive type at one reachable property.

Parameters
schema:Mapping[str, object]Schema declaration used for conversion and validation.
path:tuple[str, ...]Value supplied for path.
Returns
HeaderBindingResult of the operation described above.
def _contains_annotation(value: object) -> bool: (source)

Locate annotations even inside unsupported schema constructs.

Parameters
value:objectValue to inspect, transform or validate.
Returns
boolResult of the operation described above.
def _decode_value(value: str, name: str, *, encoded: bool) -> str: (source)

Validate ASCII transport syntax and decode the exact Base64 sentinel.

Parameters
value:strValue to inspect, transform or validate.
name:strValue supplied for name.
encoded:boolValue supplied for encoded.
Returns
strResult of the operation described above.
def _matches_integer(header: str, value: object) -> bool: (source)

Compare safe JSON integers numerically, accepting equivalent 42.0 values.

Parameters
header:strValue supplied for header.
value:objectValue to inspect, transform or validate.
Returns
boolResult of the operation described above.
def _matches_value(binding: HeaderBinding, header: str, value: object) -> bool: (source)

Compare mirrored parameters without coercing booleans into integers.

Parameters
binding:HeaderBindingValue supplied for binding.
header:strValue supplied for header.
value:objectValue to inspect, transform or validate.
Returns
boolResult of the operation described above.
def _mismatch(name: str) -> McpProtocolException: (source)

Report the failing header without reflecting untrusted field values.

Parameters
name:strValue supplied for name.
Returns
McpProtocolExceptionResult of the operation described above.
def _parameter(params: RequestParams | Mapping[str, object], name: str) -> object: (source)

Read either decoded protocol structs or an unknown method's raw mapping.

Parameters
params:RequestParams | Mapping[str, object]Parameters decoded for the requested operation.
name:strValue supplied for name.
Returns
objectResult of the operation described above.
def _single_header(headers: Headers, name: str, *, encoded: bool = False) -> str: (source)

Require one field occurrence, including case-insensitive duplicates.

Parameters
headers:HeadersValue supplied for headers.
name:strValue supplied for name.
encoded:boolValue supplied for encoded.
Returns
strResult of the operation described above.
def _validate_binding(headers: Headers, binding: HeaderBinding, arguments: object): (source)

Require mirrored values precisely when their argument is present and non-null.

Parameters
headers:HeadersValue supplied for headers.
binding:HeaderBindingValue supplied for binding.
arguments:objectArguments supplied for this operation.
Returns
NoneComplete the documented operation without returning a value.
def _validate_standard(headers: Headers, name: str, expected: object, *, encoded: bool = False): (source)

Compare one required standard header with its corresponding body field.

Parameters
headers:HeadersValue supplied for headers.
name:strValue supplied for name.
expected:objectValue supplied for expected.
encoded:boolValue supplied for encoded.
Returns
NoneComplete the documented operation without returning a value.
def _validate_version(headers: Headers, metadata: object): (source)

Distinguish invalid body metadata from a missing or disagreeing header.

Parameters
headers:HeadersValue supplied for headers.
metadata:objectMetadata associated with the current operation.
Returns
NoneComplete the documented operation without returning a value.
def _walk_properties(properties: Mapping[str, object], path: tuple[str, ...], bindings: list[HeaderBinding]): (source)

Visit named object properties with statically known extraction paths.

Parameters
properties:Mapping[str, object]Named child schemas.
path:tuple[str, ...]Parent property path.
bindings:list[HeaderBinding]Accumulator for mirrored header declarations.
Returns
NoneValid child mappings have been visited in declaration order.
def _walk_schema(schema: Mapping[str, object], path: tuple[str, ...], bindings: list[HeaderBinding]): (source)

Visit properties chains and reject annotations hidden elsewhere.

Parameters
schema:Mapping[str, object]Schema declaration used for conversion and validation.
path:tuple[str, ...]Value supplied for path.
bindings:list[HeaderBinding]Declared bindings associated with this operation.
Returns
NoneComplete the documented operation without returning a value.
def compile_header_bindings(input_schema: Mapping[str, object]) -> tuple[HeaderBinding, ...]: (source)

Validate tool schema annotations once and freeze extraction paths.

Parameters
input_schema:Mapping[str, object]Value supplied for input_schema.
Returns
tuple[HeaderBinding, ...]Result of the operation described above.
def validate_headers(headers: Headers, envelope: JsonRpcRequest, params: RequestParams | Mapping[str, object] | None = None, bindings: tuple[HeaderBinding, ...] = ()): (source)

Enforce mirrored request metadata before protocol method dispatch.

Unknown methods may omit params here to decode only their raw mapping. Notifications have no metadata-header requirements in this protocol revision.

Parameters
headers:HeadersValue supplied for headers.
envelope:JsonRpcRequestValue supplied for envelope.
params:RequestParams | Mapping[str, object] | NoneParameters decoded for the requested operation.
bindings:tuple[HeaderBinding, ...]Declared bindings associated with this operation.
Returns
NoneComplete the documented operation without returning a value.
_ANNOTATION: str = (source)

Undocumented

Value
'x-mcp-header'
_NAMED_METHODS = (source)

Undocumented

Value
frozenset(set(['tools/call', 'resources/read', 'prompts/get']))

Undocumented

Value
re.compile(r'-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][\+-]?\d+)?\Z',
           re.ASCII)

Undocumented

Value
re.compile(r'(?:[!-~](?:[\t -~]*[!-~])?)?\Z')

Undocumented

Value
'=?base64?'
_SAFE_INTEGER: int = (source)

Undocumented

Value
9007199254740991

Undocumented

Value
'?='

Undocumented

Value
re.compile(r'[!#\$%&\'\*\+-\.\^_`\|~0-9A-Za-z]+\Z')