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

Represent the task scheduler configuration for the application.

Method __post_init__ Validate and normalize the scheduler configuration after init.
Method __validateCoalesce Validate the coalesce property.
Method __validateJitter Validate the jitter property.
Method __validateMaxInstances Validate the max_instances property.
Method __validateMisfireGraceTime Validate the misfire_grace_time property.
Method __validateReplaceExisting Validate the replace_existing property.
Method __validateStore Validate and normalize the store property.
Method __validateStores Validate and convert the stores property.
Instance Variable coalesce Whether missed runs of a job are collapsed into a single run. Defaults to True.
Instance Variable jitter Maximum number of seconds of random delay applied to job execution to avoid thundering-herd effects. Defaults to 0.
Instance Variable max_instances Maximum number of concurrently running instances allowed for a single scheduled job. Defaults to 1.
Instance Variable misfire_grace_time Number of seconds a job is allowed to run late before it is considered misfired. Defaults to 30.
Instance Variable replace_existing Whether adding a job with an already registered id replaces the previous definition. Defaults to True so the declarative task list is always reconciled against a persistent job store (e.g. database/redis...
Instance Variable store The default job store used by the task scheduler. Accepts a Drivers enum member or a plain string (e.g. 'memory', 'redis'). Resolved from the TASKS_STORE environment variable or Drivers.MEMORY.value.
Instance Variable stores Configuration for the available scheduler job stores. Defaults to a Stores instance backed by the in-memory job store.

Inherited from BaseEntity:

Class Method _cachedFieldMetadata Retrieve field definitions and normalized types cached by class.
Method getFields Describe field names, normalized types, defaults, and metadata.
Method toDict Convert the dataclass instance to a recursively copied dictionary.
Class Variable __slots__ Undocumented
def __post_init__(self): (source)

Validate and normalize the scheduler configuration after init.

Returns
NoneModifies instance attributes in place via object.__setattr__.
Raises
TypeErrorIf any property does not match its expected type.
ValueErrorIf any property fails its value validation.
def __validateCoalesce(self): (source)

Validate the coalesce property.

Returns
NoneThis method performs validation and returns None.
Raises
TypeErrorIf coalesce is not a boolean.
def __validateJitter(self): (source)

Validate the jitter property.

Returns
NoneThis method performs validation and returns None.
Raises
TypeErrorIf jitter is not an integer.
ValueErrorIf jitter is negative.
def __validateMaxInstances(self): (source)

Validate the max_instances property.

Returns
NoneThis method performs validation and returns None.
Raises
TypeErrorIf max_instances is not an integer.
ValueErrorIf max_instances is lower than 1.
def __validateMisfireGraceTime(self): (source)

Validate the misfire_grace_time property.

Returns
NoneThis method performs validation and returns None.
Raises
TypeErrorIf misfire_grace_time is not an integer or None.
ValueErrorIf misfire_grace_time is lower than 1.
def __validateReplaceExisting(self): (source)

Validate the replace_existing property.

Returns
NoneThis method performs validation and returns None.
Raises
TypeErrorIf replace_existing is not a boolean.
def __validateStore(self): (source)

Validate and normalize the store property.

Returns
NoneNormalizes store to its canonical string value via object.__setattr__.
Raises
TypeErrorIf store is neither a Drivers enum nor a string.
ValueErrorIf store is a string that does not match any valid driver.
def __validateStores(self): (source)

Validate and convert the stores property.

Returns
NoneConverts a dict to a Stores instance via object.__setattr__.
Raises
TypeErrorIf stores is not a Stores instance or a dict.
coalesce: bool = (source)

Whether missed runs of a job are collapsed into a single run. Defaults to True.

Maximum number of seconds of random delay applied to job execution to avoid thundering-herd effects. Defaults to 0.

max_instances: int = (source)

Maximum number of concurrently running instances allowed for a single scheduled job. Defaults to 1.

misfire_grace_time: int = (source)

Number of seconds a job is allowed to run late before it is considered misfired. Defaults to 30.

replace_existing: bool = (source)

Whether adding a job with an already registered id replaces the previous definition. Defaults to True so the declarative task list is always reconciled against a persistent job store (e.g. database/redis) on every restart, instead of raising ConflictingIdError for jobs that already exist from a previous run.

store: Drivers | str = (source)

The default job store used by the task scheduler. Accepts a Drivers enum member or a plain string (e.g. 'memory', 'redis'). Resolved from the TASKS_STORE environment variable or Drivers.MEMORY.value.

stores: Stores | dict = (source)

Configuration for the available scheduler job stores. Defaults to a Stores instance backed by the in-memory job store.