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 a background task that can be executed asynchronously.

Parameters
funcThe function to be executed in the background.
*argsPositional arguments to pass to the function.
**kwargsKeyword arguments to pass to the function.
Async Method __call__ Execute the background task, handling both sync and async functions.
Async Method __executeSync Run synchronous work and release its result if the caller cancels.
Method __init__ Initialize the BackgroundTask instance.
Async Method run Run the background task.
Class Variable __slots__ Declare the instance attribute slots reserved by this class.
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 the background task, handling both sync and async functions.

Returns
NoneThis method does not return a value.
async def __executeSync(self) -> object: (source)

Run synchronous work and release its result if the caller cancels.

Returns
objectWorker result when the caller remains active.
Raises
asyncio.CancelledErrorAfter the worker has finished and an abandoned awaitable is released.
ExceptionIf the worker fails while the caller is still awaiting it.
def __init__(self, func: Callable, *args: object, **kwargs: object): (source)

Initialize the BackgroundTask instance.

Parameters
func:collections.abc.CallableThe function to be executed in the background.
*args:objectPositional arguments to pass to the function.
**kwargs:objectKeyword arguments to pass to the function.
Returns
NoneThis method does not return a value.
async def run(self): (source)

Run the background task.

Returns
NoneThis method does not return a value.
__slots__: tuple[str, ...] = (source)

Declare the instance attribute slots reserved by this class.

__args: tuple[object, ...] = (source)

Positional arguments to pass to the function.

__func: Callable[..., Any] = (source)

The function to be executed in the background.

__is_async: bool = (source)

Is async produced by is_async_callable.

Keyword arguments to pass to the function.