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
Compile schema declarations and provide their structured representation.
| Class | |
Collect schema declarations and prepare their validation metadata. |
| Function | _compile |
Compile an Annotated layer and preserve its local error messages. |
| Function | _compile |
Compile constraints throughout an annotation and its nested types. |
| Constant | _CONSTRAINT |
ValidationMetadata subclass -> msgspec.Meta keyword argument name. |
| Variable | _ |
The metaclass for all Schema subclasses. Intercept class creation to compile ValidationMetadata into msgspec.Meta and collect custom metadata for later use. |
def _compile_annotated(annotation:
object, arguments: tuple, *, nested: bool) -> tuple[ object, dict[ str, str]]:
(source)
¶
Compile an Annotated layer and preserve its local error messages.
| Parameters | |
annotation:object | Original Annotated declaration. |
arguments:tuple | Base type followed by the declaration's metadata items. |
nested:bool | Whether the declaration belongs to a collection item or union branch. |
| Returns | |
tuple[object, dict[str, str]] | Rebuilt annotation and its messages indexed by validation code. |
| Raises | |
TypeError | If nested metadata contains a rule requiring field-level execution. |
orionis.schemas.compiler.MetadataConflictError | If constraint declarations are invalid or incompatible. |
def _compile_annotation(annotation:
object, *, nested: bool = False) -> tuple[ object, dict[ str, str]]:
(source)
¶
Compile constraints throughout an annotation and its nested types.
| Parameters | |
annotation:object | Field or element annotation to compile. |
nested:bool, optional | Whether the annotation belongs to a collection item or union branch. |
| Returns | |
tuple[object, dict[str, str]] | Compiled annotation and messages declared on its outer metadata layer. |
| Raises | |
TypeError | If a collection item or union branch declares an unsupported rule. |
orionis.schemas.compiler.MetadataConflictError | If constraint declarations are invalid or incompatible. |
ValidationMetadata subclass -> msgspec.Meta keyword argument name.
| Value |
|