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
Configure named queue connections, failure storage, and workers.
| Static Method | __validate |
Validate reservation leases and isolate failure storage. |
| Static Method | __validate |
Require distinct persistent storage for named durable connections. |
| Method | __normalize |
Validate conventional or named connections as typed entities. |
| Method | __normalize |
Convert failure storage mappings to a validated immutable entity. |
| Method | __normalize |
Convert worker mappings to a validated immutable entity. |
| Method | __post |
Normalize nested entities and reject invalid worker leases. |
| Instance Variable | connections |
Conventional connections or named backends converted to typed entities. |
| Instance Variable | default |
Default connection name, read from QUEUE_CONNECTION. |
| Instance Variable | failed |
Database connection and table used to preserve failed jobs. |
| Instance Variable | worker |
Default concurrency, polling interval, timeout, tries, and backoff. |
Inherited from BaseEntity:
| Class Method | _cached |
Retrieve field definitions and normalized types cached by class. |
| Method | __init__ |
Initialize declared fields and public extra attributes. |
| Method | _dynamic |
Return public instance attributes that are not declared fields. |
| Method | _validate |
Validate names and storage for public extra attributes. |
| Method | get |
Describe declared fields and, optionally, dynamic attributes. |
| Method | to |
Return a recursively copied dictionary of declared and extra values. |
| Class Variable | __slots__ |
Declare that this class introduces no additional instance slots. |
| Class Variable | _orionis |
Cache declared fields and normalized type names for each concrete class. |
def __validateConnections(connections:
dict[ str, Sync | Database | Redis], worker: Worker, failed: Failed):
(source)
¶
Validate reservation leases and isolate failure storage.
| Parameters | |
connections:dict[str, Sync | Database | Redis] | Validated named connection entities. |
worker:orionis.foundation.config.queue.Worker | Validated execution defaults. |
failed:orionis.foundation.config.queue.Failed | Validated failed-job storage. |
| Returns | |
None | Check relationships across the configuration entities. |
| Raises | |
ValueError | If a lease is unsafe or persistent storage namespaces overlap. |
Require distinct persistent storage for named durable connections.
| Parameters | |
connections:dict[str, Sync | Database | Redis] | Validated named connection entities. |
| Returns | |
None | Require independent tables or Redis prefixes for durable connections. |
| Raises | |
ValueError | If two connections use the same persistent storage namespace. |
Validate conventional or named connections as typed entities.
| Returns | |
dict[str, Sync | Database | Redis] | Validated connections indexed by their configured names. |
| Raises | |
TypeError | If a connection has an unexpected type or unsupported fields. |
ValueError | If a connection name, driver, or nested setting is invalid. |
Convert failure storage mappings to a validated immutable entity.
| Returns | |
orionis.foundation.config.queue.Failed | Validated failed-job storage. |
| Raises | |
TypeError | If settings have an unexpected type or unsupported fields. |
ValueError | If a database identifier is invalid. |
Convert worker mappings to a validated immutable entity.
| Returns | |
orionis.foundation.config.queue.Worker | Validated worker defaults. |
| Raises | |
TypeError | If settings have an unexpected type or unsupported fields. |
ValueError | If a worker limit or duration is invalid. |
Normalize nested entities and reject invalid worker leases.
| Returns | |
None | Store typed settings and validate their relationships. |
| Raises | |
TypeError | If settings or durations have invalid types. |
ValueError | If identifiers, drivers, defaults, or lease relationships are invalid. |