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.
Includes register_messages, annotation_messages, constraint_plan.
| Class | _ |
Keep annotations with distinct messages from sharing a typing cache key. |
| Function | _cache |
Publish a completed plan while evicting the least recently used annotations. |
| Function | _constraint |
Build independent checks for the constraints in one metadata entry. |
| Function | annotation |
Retrieve the most recently attached local message marker. |
| Function | constraint |
Build and cache independent native checks for local constraints. |
| Function | register |
Attach and index local messages during annotation compilation. |
| Constant | _CACHE |
Bounded identity cache retaining each annotation alongside its immutable plan. |
| Constant | _CACHE |
Serialize cache promotion and eviction across concurrent schema consumers. |
| Constant | _CACHE |
Maximum number of retained constraint plans, including unhashable annotations. |
| Constant | _KEYS |
Keys definitions used by constraint_plan. |
def _constraint_probes(probe_base:
object, meta: msgspec.Meta, messages: dict[ str, str]) -> list[ tuple[ str, object, str | None]]:
(source)
¶
Build independent checks for the constraints in one metadata entry.
| Parameters | |
probeobject | Unconstrained type checked by each probe. |
meta:msgspec.Meta | Native constraint metadata to split into individual checks. |
messages:dict[str, str] | Custom messages indexed by validation code. |
| Returns | |
list[tuple[str, object, str | None]] | Entries of (code, annotation, custom_message). |
Attach and index local messages during annotation compilation.
| Parameters | |
annotation:object | Compiled annotation that owns the messages. |
messages:dict[str, str] | Custom messages indexed by validation code. |
| Returns | |
object | Annotation carrying distinct message metadata, or the original annotation when no messages are supplied. |