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

class JobSerializer(IJobSerializer): (source)

Constructor: JobSerializer()

View In Hierarchy

Serialize explicit job state through a registry of application-trusted types.

Method __init__ Initialize reusable codecs and an empty trusted registry.
Method _checkSize Reject oversized or nonbinary wire data before decoding.
Method _validateFields Validate annotated fields without accepting arbitrary application types.
Method decode Restore primitive fields for a registered identity without running init.
Method decodeEnvelope Validate untrusted envelope JSON without resolving its job type.
Method encode Serialize declared fields while rejecting service and undeclared state.
Method encodeEnvelope Encode the immutable envelope as explicit versioned JSON.
Method register Register a concrete async job class supplied by trusted application code.
Class Variable __slots__ Declare the instance attribute slots reserved by this class.
Instance Variable _decoder Decoder produced by msgspec.json.Decoder.
Instance Variable _encoder Encoder produced by msgspec.json.Encoder.
Instance Variable _registry Registered implementations indexed by their public identifiers.
Instance Variable _state_decoder State decoder produced by msgspec.msgpack.Decoder.
Instance Variable _types Types registered for validation, serialization or schema operations.
def __init__(self): (source)

Initialize reusable codecs and an empty trusted registry.

Returns
NoneRetain codecs without importing application job modules.
def _checkSize(self, payload: bytes): (source)

Reject oversized or nonbinary wire data before decoding.

Parameters
payload:bytesSerialized job or envelope.
Returns
NoneEnforce the wire-size limit.
def _validateFields(self, metadata: _JobMetadata, values: dict[str, object]): (source)

Validate annotated fields without accepting arbitrary application types.

Parameters
metadata:orionis.queues.serializer._JobMetadataTrusted persistent field constraints.
values:dict[str, object]Restored or declared primitive state.
Returns
NoneValidate field types without invoking job constructors.
def decode(self, identity: str, payload: bytes) -> BaseJob: (source)

Restore primitive fields for a registered identity without running init.

Parameters
identity:strStable trusted identity, never an instruction to import a module.
payload:bytesUntrusted MessagePack state.
Returns
orionis.queues.BaseJobReconstructed job awaiting scoped DI invocation.
def decodeEnvelope(self, payload: bytes) -> JobEnvelope: (source)

Validate untrusted envelope JSON without resolving its job type.

Parameters
payload:bytesStored wire data.
Returns
orionis.queues.JobEnvelopeImmutable options ready for registry-based state decoding.
def encode(self, job: BaseJob) -> tuple[str, bytes]: (source)

Serialize declared fields while rejecting service and undeclared state.

Parameters
job:orionis.queues.BaseJobTrusted application job instance.
Returns
tuple[str, bytes]Stable identity and primitive MessagePack payload.
Raises
orionis.queues.exceptions.QueuePayloadErrorIf state is undeclared, unsupported, or exceeds the payload limit.
def encodeEnvelope(self, envelope: JobEnvelope) -> bytes: (source)

Encode the immutable envelope as explicit versioned JSON.

Parameters
envelope:orionis.queues.JobEnvelopeValidated execution data.
Returns
bytesJSON suitable for native binary database or Redis storage.
def register(self, job_type: type[BaseJob]): (source)

Register a concrete async job class supplied by trusted application code.

Parameters
job_type:type[orionis.queues.BaseJob]Class imported by application bootstrap or dispatched locally.
Returns
NoneCache metadata once for the stable identity.
__slots__: tuple[str, ...] = (source)

Declare the instance attribute slots reserved by this class.

_decoder = (source)

Decoder produced by msgspec.json.Decoder.

_encoder = (source)

Encoder produced by msgspec.json.Encoder.

Registered implementations indexed by their public identifiers.

_state_decoder = (source)

State decoder produced by msgspec.msgpack.Decoder.

Types registered for validation, serialization or schema operations.