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 _check_metadata Reject extra schema validation rules the native validator cannot enforce.
Function _check_type Inspect metadata across nested fields and recursive type declarations.
Function _inline Inline acyclic local references while preserving recursive definitions.
Function _schema_hook Represent an unconstrained JSON value without inventing custom type schemas.
Function _validate_schema_additions Require additional schema keywords to match native validation behavior.
Function compile_schema Produce the native JSON Schema, preserving local references and constraints.
Function convert_payload Validate native rules for Schema and strict msgspec types otherwise.
Constant _ANNOTATION_KEYS Undocumented
Constant _DEFINITIONS Undocumented
Constant _DIALECT Undocumented
Constant _META_FIELDS Undocumented
def _check_metadata(annotation: object): (source)

Reject extra schema validation rules the native validator cannot enforce.

Parameters
annotation:objectNative type annotation to inspect or validate.
Returns
NoneComplete the documented operation without returning a value.
def _check_type(annotation: object, visited: set[object]): (source)

Inspect metadata across nested fields and recursive type declarations.

Parameters
annotation:objectNative type annotation to inspect or validate.
visited:set[object]Value supplied for visited.
Returns
NoneComplete the documented operation without returning a value.
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:objectValue 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
objectResult of the operation described above.
def _schema_hook(annotation: type) -> dict[str, object]: (source)

Represent an unconstrained JSON value without inventing custom type schemas.

Parameters
annotation:typeNative type annotation to inspect or validate.
Returns
dict[str, 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
NoneEvery validation keyword matches a native constraint.
Raises
ValueErrorIf an additional keyword advertises an unenforced constraint.
def compile_schema(annotation: object, *, input_schema: bool = False) -> dict[str, object]: (source)

Produce the native JSON Schema, preserving local references and constraints.

Parameters
annotation:objectNative type annotation to inspect or validate.
input_schema:boolValue supplied for input_schema.
Returns
dict[str, object]Result of the operation described above.
def convert_payload(value: object, annotation: object) -> object: (source)

Validate native rules for Schema and strict msgspec types otherwise.

Parameters
value:objectValue to inspect, transform or validate.
annotation:objectNative type annotation to inspect or validate.
Returns
objectResult of the operation described above.
_ANNOTATION_KEYS = (source)

Undocumented

Value
frozenset(set(['title',
               'description',
               'examples',
               'default',
               'deprecated',
               'readOnly',
               'writeOnly',
...
_DEFINITIONS: str = (source)

Undocumented

Value
'$defs'
_DIALECT: str = (source)

Undocumented

Value
'https://json-schema.org/draft/2020-12/schema'
_META_FIELDS: tuple[str, ...] = (source)

Undocumented

Value
('gt',
 'ge',
 'lt',
 'le',
 'multiple_of',
 'pattern',
 'min_length',
...