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.

class documentation

Collect schema declarations and prepare their validation metadata.

Static Method _collect Collect application metadata from a newly created schema class.
Static Method _compileExplicit Compile eager or string annotations before native conversion is cached.
Static Method _wrap Wrap lazy annotation resolution with recursive metadata compilation.
Method __new__ Build a Schema subclass with compiled metadata and rule plans.
def _collect(klass: type) -> dict[str, list[object]]: (source)

Collect application metadata from a newly created schema class.

Exclude native constraint metadata and internal message markers.

Parameters
klass:typeSchema class whose field metadata is inspected.
Returns
dict[str, list[object]]Field names mapped to their application metadata items, omitting fields with no such items.
def _compileExplicit(klass: type, annotations: dict[str, object], messages: dict[str, dict[str, str]]): (source)

Compile eager or string annotations before native conversion is cached.

Parameters
klass:typeNewly created schema whose declaration does not use a lazy callback.
annotations:dict[str, object]Original local annotations, including any non-field declarations.
messages:dict[str, dict[str, str]]Mapping receiving local constraint and type messages.
Returns
NoneNo return value.
def _wrap(original_func: Callable[[int], dict[str, object]], constraint_msgs: dict[str, dict[str, str]]) -> Callable[[int], dict[str, object]]: (source)

Wrap lazy annotation resolution with recursive metadata compilation.

Parameters
original_func:collections.abc.Callable[[int], dict[str, object]]Original PEP 649 annotation callback.
constraint_msgs:dict[str, dict[str, str]]Mapping populated with each field's local validation messages.
Returns
collections.abc.Callable[[int], dict[str, object]]Callback that compiles metadata while preserving string requests.
def __new__(cls, name: str, bases: tuple[type, ...], namespace: dict[str, object], **kwargs: object) -> SchemaMeta: (source)

Build a Schema subclass with compiled metadata and rule plans.

Compile lazy annotations, merge inherited messages and index errors by encoded field name before preparing the validation plan.

Parameters
cls:typeMetaclass constructing the schema.
name:strName of the schema class.
bases:tuple[type, ...]Direct base classes.
namespace:dict[str, object]Class body namespace.
**kwargs:objectOptions forwarded to the msgspec.Struct metaclass.
Returns
orionis.schemas.schema.SchemaMetaPrepared schema class.
Raises
TypeErrorIf field metadata contains an unsupported rule declaration.
orionis.schemas.compiler.MetadataConflictErrorIf constraint declarations are invalid or incompatible.