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
Serialize explicit job state through a registry of application-trusted types.
| Method | __init__ |
Initialize reusable codecs and an empty trusted registry. |
| Method | _check |
Reject oversized or nonbinary wire data before decoding. |
| Method | _validate |
Validate annotated fields without accepting arbitrary application types. |
| Method | decode |
Restore primitive fields for a registered identity without running init. |
| Method | decode |
Validate untrusted envelope JSON without resolving its job type. |
| Method | encode |
Serialize declared fields while rejecting service and undeclared state. |
| Method | encode |
Encode the immutable envelope as explicit versioned JSON. |
| Method | register |
Register a concrete async job class supplied by trusted application code. |
| Class Variable | __slots__ |
Undocumented |
| Instance Variable | _decoder |
Undocumented |
| Instance Variable | _encoder |
Undocumented |
| Instance Variable | _registry |
Undocumented |
| Instance Variable | _state |
Undocumented |
| Instance Variable | _types |
Undocumented |
Initialize reusable codecs and an empty trusted registry.
| Returns | |
None | Retain codecs without importing application job modules. |
Validate annotated fields without accepting arbitrary application types.
| Parameters | |
metadata:_JobMetadata | Trusted persistent field constraints. |
values:dict[str, object] | Restored or declared primitive state. |
| Returns | |
None | Validate field types without invoking job constructors. |
Validate untrusted envelope JSON without resolving its job type.
| Parameters | |
payload:bytes | Stored wire data. |
| Returns | |
JobEnvelope | Immutable options ready for registry-based state decoding. |
Serialize declared fields while rejecting service and undeclared state.
| Parameters | |
job:BaseJob | Trusted application job instance. |
| Returns | |
tuple[str, bytes] | Stable identity and primitive MessagePack payload. |
| Raises | |
QueuePayloadError | If state is undeclared, unsupported, or exceeds the payload limit. |
Encode the immutable envelope as explicit versioned JSON.
| Parameters | |
envelope:JobEnvelope | Validated execution data. |
| Returns | |
bytes | JSON suitable for native binary database or Redis storage. |