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

Provide schemas operations through instance_payload.

Function instance_payload Expand structs using their wire names, tags and container shape.
Function matching_schema Match a schema's wire representation and optional discriminator tag.
Function matching_type Select a schema or collection annotation matching an input representation.
Constant _PLANS Plans definitions used by instance_payload.
def instance_payload(value: object) -> object: (source)

Expand structs using their wire names, tags and container shape.

Include default values and preserve native leaves so validation cannot skip existing struct fields or accept values coerced by serialization.

Parameters
value:objectStruct, supported container or native value to prepare for validation.
Returns
objectExpanded dictionaries and lists, or the original native leaf value.
def matching_schema(schema: type[msgspec.Struct], value: object) -> type[msgspec.Struct] | None: (source)

Match a schema's wire representation and optional discriminator tag.

Parameters
schema:type[msgspec.Struct]Schema whose object or array representation is expected.
value:objectInput to compare with the schema configuration.
Returns
type[msgspec.Struct] | NoneSchema when its shape and tag match, otherwise None.
def matching_type(annotation: object, value: object) -> object | None: (source)

Select a schema or collection annotation matching an input representation.

Parameters
annotation:objectField annotation, possibly annotated or a union.
value:objectInput whose shape and discriminator tag are inspected.
Returns
object | NoneMatching schema or collection annotation, if one applies.

Plans definitions used by instance_payload.

Value
{}