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 server operations through compile_schema, convert_payload.
| Function | _check |
Reject extra schema validation rules the native validator cannot enforce. |
| Function | _check |
Inspect metadata across nested fields and recursive type declarations. |
| Function | _inline |
Inline acyclic local references while preserving recursive definitions. |
| Function | _schema |
Represent an unconstrained JSON value without inventing custom type schemas. |
| Function | _validate |
Require additional schema keywords to match native validation behavior. |
| Function | compile |
Prepare conversion metadata once for a compiled tool declaration. |
| Function | compile |
Produce the native JSON Schema, preserving local references and constraints. |
| Async Function | convert |
Validate and convert a payload to its declared native type. |
| Constant | _ANNOTATION |
Annotation keys used by schemas. |
| Constant | _DEFINITIONS |
$defs. |
| Constant | _DIALECT |
https://json-schema.org/draft/2020-12/schema. |
| Constant | _META |
Meta fields definitions used by schemas. |
| Type Alias | _ |
Preparation requirement and schema rules retained by a compiled primitive. |
def _inline(value:
object, definitions: dict[ str, object], ancestors: tuple[ str, ...], referenced: set[ str]) -> object:
(source)
¶
Inline acyclic local references while preserving recursive definitions.
| Parameters | |
value:object | Value to inspect, transform or validate. |
definitions:dict[str, object] | Value supplied for definitions. |
ancestors:tuple[str, ...] | Value supplied for ancestors. |
referenced:set[str] | Value supplied for referenced. |
| Returns | |
object | Result of the operation described above. |
def _validate_schema_additions(native:
dict[ str, object], additions: list[ dict[ str, object]]):
(source)
¶
Require additional schema keywords to match native validation behavior.
| Parameters | |
native:dict[str, object] | JSON Schema generated from native type constraints. |
additions:list[dict[str, object]] | Additional keywords declared by the application. |
| Returns | |
None | Every validation keyword matches a native constraint. |
| Raises | |
ValueError | If an additional keyword advertises an unenforced constraint. |
Prepare conversion metadata once for a compiled tool declaration.
| Parameters | |
annotation:object | Trusted input or output annotation. |
| Returns | |
orionis.mcp.server.schemas._ConversionPlan | Copy-on-write preparation flag and immutable nested rule plans. |
async def convert_payload(value:
object, annotation: object, *, plan: _ConversionPlan | None = None) -> object:
(source)
¶
Validate and convert a payload to its declared native type.
| Parameters | |
value:object | Raw payload value to validate and convert. |
annotation:object | Declared Schema subclass or msgspec-compatible target type. |
plan:orionis.mcp.server.schemas._ConversionPlan | None, optional | Compiled conversion metadata, or None for a standalone conversion. |
| Returns | |
object | Converted payload with native Schema rules applied when present. |
Annotation keys used by schemas.
| Value |
|
Meta fields definitions used by schemas.
| Value |
|
Preparation requirement and schema rules retained by a compiled primitive.
| Value |
|