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

Manage and execute a collection of background tasks sequentially.

This class holds an ordered list of orionis.background.BackgroundTask instances and runs them one after another when invoked.

Async Method __call__ Execute all background tasks sequentially.
Method __init__ Initialize BackgroundTasks with an optional sequence of tasks.
Method addTask Add a new BackgroundTask to the task list.
Class Variable __slots__ Declare the instance attribute slots reserved by this class.
Instance Variable tasks Optional sequence of BackgroundTask instances to initialize with.

Inherited from BackgroundTask:

Async Method __executeSync Run synchronous work and release its result if the caller cancels.
Async Method run Run the background task.
Instance Variable __args Positional arguments to pass to the function.
Instance Variable __func The function to be executed in the background.
Instance Variable __is_async Is async produced by is_async_callable.
Instance Variable __kwargs Keyword arguments to pass to the function.
async def __call__(self): (source)

Execute all background tasks sequentially.

Returns
NoneThis method does not return a value.
def __init__(self, tasks: Sequence[BackgroundTask] | None = None): (source)

Initialize BackgroundTasks with an optional sequence of tasks.

Parameters
tasks:collections.abc.Sequence[orionis.background.BackgroundTask] | NoneOptional sequence of BackgroundTask instances to initialize with.
Returns
NoneThis method does not return a value.
def addTask(self, func: Callable, *args: object, **kwargs: object): (source)

Add a new BackgroundTask to the task list.

Parameters
func:collections.abc.CallableThe function to be executed as a background task.
*args:objectPositional arguments to pass to the function.
**kwargs:objectKeyword arguments to pass to the function.
Returns
NoneThis method does not return a value.
__slots__: tuple[str, ...] = (source)

Declare the instance attribute slots reserved by this class.

Optional sequence of BackgroundTask instances to initialize with.