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

Poll a Redis NX lease rather than relying on process-local waiter events.

Async Method __aenter__ Acquire a distributed lease with a finite waiting budget.
Async Method __aexit__ Finish bounded ownership cleanup before propagating cancellation.
Method __init__ Retain bounded acquisition settings and a unique release token.
Async Method _acquire Poll atomic acquisition until cancellation or the outer timeout.
Async Method _release Delete only this owner's lease, including after an uncertain acquisition.
Instance Variable _backend Storage backend implementing the cache operations.
Instance Variable _key Cache or lease key to access.
Instance Variable _lease Lease lifetime in seconds; use the store default when omitted.
Instance Variable _owner Ownership token used to identify the current holder.
Instance Variable _wait Maximum number of seconds to wait for ownership.
async def __aenter__(self: Self) -> Self: (source)

Acquire a distributed lease with a finite waiting budget.

Returns
typing.SelfThis lease after successful ownership acquisition.
async def __aexit__(self: Self, _type: type[BaseException] | None, _value: BaseException | None, _traceback: TracebackType | None): (source)

Finish bounded ownership cleanup before propagating cancellation.

Parameters
_type:type[BaseException] | NoneException type raised by the context body, if any.
_value:BaseException | NoneException raised by the context body, if any.
_traceback:types.TracebackType | NoneTraceback attached to the context exception, if any.
Returns
NoneNo return value.
Raises
ExceptionIf release fails and the protected operation succeeded.
def __init__(self: Self, backend: Any, key: str, lease: float, wait_timeout: float): (source)

Retain bounded acquisition settings and a unique release token.

Parameters
backend:typing.AnyStorage backend implementing the cache operations.
key:strCache or lease key to access.
lease:floatLease lifetime in seconds; use the store default when omitted.
wait_timeout:floatMaximum number of seconds to wait for ownership.
Returns
NoneNo return value.
async def _acquire(self: Self): (source)

Poll atomic acquisition until cancellation or the outer timeout.

Returns
NoneNo return value.
async def _release(self: Self): (source)

Delete only this owner's lease, including after an uncertain acquisition.

Returns
NoneNo return value.
_backend = (source)

Storage backend implementing the cache operations.

Cache or lease key to access.

Lease lifetime in seconds; use the store default when omitted.

Ownership token used to identify the current holder.

Maximum number of seconds to wait for ownership.