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

Function _common Validate annotations and metadata shared by content variants.
Function _message Validate a prompt role and its single content block.
Function _object Convert a public wire struct without a second JSON serialization.
Function _result_payload Check only dynamic application payloads; registry metadata is precompiled.
Function _validate_completion Check completion count and total bounds before serialization.
Function validate_content Validate all five standard MCP content variants.
Function validate_json Reject non-JSON values and nonfinite numbers rather than changing data.
Function validate_resource Check text/blob resource contents and their explicit URI.
Function validate_result Reject invalid direct Struct construction and method/result mismatches.
Constant _CONTENT_TYPES Undocumented
Constant _MAX_COMPLETIONS Undocumented
Constant _RESULT_TYPES Undocumented
def _common(value: dict[str, object]): (source)

Validate annotations and metadata shared by content variants.

Parameters
value:dict[str, object]Value to inspect, transform or validate.
Returns
NoneComplete the documented operation without returning a value.
def _message(message: object): (source)

Validate a prompt role and its single content block.

Parameters
message:objectValue supplied for message.
Returns
NoneComplete the documented operation without returning a value.
def _object(value: object) -> dict[str, object]: (source)

Convert a public wire struct without a second JSON serialization.

Parameters
value:objectValue to inspect, transform or validate.
Returns
dict[str, object]Result of the operation described above.
def _result_payload(result: object): (source)

Check only dynamic application payloads; registry metadata is precompiled.

Parameters
result:objectValue supplied for result.
Returns
NoneComplete the documented operation without returning a value.
def _validate_completion(result: CompleteCompletionResult): (source)

Check completion count and total bounds before serialization.

Parameters
result:CompleteCompletionResultCompletion response supplied by the application.
Returns
NoneCompletion values and total satisfy the protocol limits.
Raises
ValueErrorIf the number of values or declared total is invalid.
def validate_content(content: object): (source)

Validate all five standard MCP content variants.

Parameters
content:objectValue supplied for content.
Returns
NoneComplete the documented operation without returning a value.
def validate_json(value: object): (source)

Reject non-JSON values and nonfinite numbers rather than changing data.

Parameters
value:objectValue to inspect, transform or validate.
Returns
NoneComplete the documented operation without returning a value.
def validate_resource(content: object): (source)

Check text/blob resource contents and their explicit URI.

Parameters
content:objectValue supplied for content.
Returns
NoneComplete the documented operation without returning a value.
def validate_result(result: object, method: str): (source)

Reject invalid direct Struct construction and method/result mismatches.

Parameters
result:objectValue supplied for result.
method:strValue supplied for method.
Returns
NoneComplete the documented operation without returning a value.
_CONTENT_TYPES = (source)

Undocumented

Value
{'text': TextContent,
 'image': ImageContent,
 'audio': AudioContent,
 'resource_link': ResourceLink}
_MAX_COMPLETIONS: int = (source)

Undocumented

Value
100
_RESULT_TYPES = (source)

Undocumented

Value
{'server/discover': DiscoverResult,
 'tools/list': ListToolsResult,
 'tools/call': CallToolResult,
 'resources/list': ListResourcesResult,
 'resources/templates/list': ListResourceTemplatesResult,
 'resources/read': ReadResourceResult,
 'prompts/list': ListPromptsResult,
...