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.

module documentation

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

Class _JobMetadata Retain trusted class metadata independently of live job instances.
Class JobSerializer Serialize explicit job state through a registry of application-trusted types.
Function _collect_job_fields Collect one job class's declared slots and resolved persistent annotations.
Function _job_metadata Collect inherited persistent slots and annotations from a trusted class.
Function _pack_value Validate owned primitive data and tag tuples in MessagePack.
Function _unpack_extension Restore the tuple extension without importing or invoking payload types.
Function _validate_annotation Check whether a field annotation contains only supported state types.
Function _validate_unpacked_value Validate decoded primitive state without rebuilding its containers.
Constant _MAX_PAYLOAD_BYTES Max payload bytes used by serializer.
Constant _MAX_STATE_DEPTH Max state depth value used by serializer.
Constant _OPTIONS Options used by serializer.
Constant _SCALAR_TYPES Scalar types used by serializer.
Constant _TUPLE_EXTENSION Tuple extension value used by serializer.
def _collect_job_fields(parent: type[BaseJob], names: dict[str, None], annotations: dict[str, object]): (source)

Collect one job class's declared slots and resolved persistent annotations.

Evaluate postponed annotations from the trusted class's defining module before distinguishing class policy from persistent fields.

Parameters
parent:type[orionis.queues.BaseJob]Registered job class or one of its BaseJob ancestors.
names:dict[str, None]Ordered persistent field names collected across the hierarchy.
annotations:dict[str, object]Field constraints updated by more specific classes.
Returns
NoneNo return value.
def _job_metadata(job_type: type[BaseJob]) -> _JobMetadata: (source)

Collect inherited persistent slots and annotations from a trusted class.

Parameters
job_type:type[orionis.queues.BaseJob]Concrete job class registered by application code.
Returns
orionis.queues.serializer._JobMetadataPersistent field names and optional primitive type constraints.
Raises
orionis.queues.exceptions.QueueConfigurationErrorIf persistent fields are private, shadow job options, or use unsupported annotations.
def _pack_value(value: object, depth: int = 0) -> object: (source)

Validate owned primitive data and tag tuples in MessagePack.

Parameters
value:objectField value or nested item.
depth:int, optionalCurrent nesting level.
Returns
objectData supported by the MessagePack encoder.
Raises
orionis.queues.exceptions.QueuePayloadErrorIf state exceeds the depth limit, contains unsupported objects, nonfinite numbers, or dictionary keys that are not plain strings.
def _unpack_extension(code: int, data: memoryview) -> tuple[object, ...]: (source)

Restore the tuple extension without importing or invoking payload types.

Parameters
code:intMessagePack extension discriminator.
data:memoryviewEncoded tuple items.
Returns
tuple[object, ...]Restored primitive tuple.
def _validate_annotation(annotation: object) -> bool: (source)

Check whether a field annotation contains only supported state types.

Parameters
annotation:objectTrusted class field annotation.
Returns
boolWhether msgspec can validate this field without constructing services.
def _validate_unpacked_value(value: object, depth: int = 0): (source)

Validate decoded primitive state without rebuilding its containers.

Parameters
value:objectDecoded field value or nested item.
depth:int, optionalCurrent nesting level.
Returns
NoneAccept supported state without copying decoded containers.
Raises
orionis.queues.exceptions.QueuePayloadErrorIf state exceeds the depth limit or contains unsupported values.
_MAX_PAYLOAD_BYTES = (source)

Max payload bytes used by serializer.

Value
1024 * 1024
_MAX_STATE_DEPTH: int = (source)

Max state depth value used by serializer.

Value
32
_OPTIONS = (source)

Options used by serializer.

Value
frozenset(set(['tries', 'timeout', 'backoff']))
_SCALAR_TYPES = (source)

Scalar types used by serializer.

Value
frozenset(set([str, bytes, int, float, bool, type(None)]))
_TUPLE_EXTENSION: int = (source)

Tuple extension value used by serializer.

Value
1