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

Coordinate cache access through local locks or distributed leases.

Async Method __acquireDatabaseLock Acquire the row-based database lock, polling until available.
Async Method __aenter__ Acquire the lock before entering the protected block.
Async Method __aexit__ Release the lock after leaving the protected block.
Method __init__ Initialize the lock for key on backend.
Class Variable __slots__ Declare the instance attribute slots reserved by this class.
Instance Variable _backend Raw cache backend.
Instance Variable _impl Underlying lock implementation selected for the cache backend.
Instance Variable _key Cache key to lock on.
Instance Variable _owner Ownership token used to identify the current holder.
Instance Variable _timeout Store-specific acquisition timeout or lease duration in seconds.
async def __acquireDatabaseLock(self): (source)

Acquire the row-based database lock, polling until available.

Mirrors the blocking semantics of the other branches: it waits until the lock is free, raising once timeout elapses.

Returns
NoneNo return value.
Raises
TimeoutErrorIf the lock cannot be acquired before timeout elapses.
async def __aenter__(self) -> Self: (source)

Acquire the lock before entering the protected block.

Returns
typing.SelfThis CacheLock instance.
async def __aexit__(self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: types.TracebackType | None): (source)

Release the lock after leaving the protected block.

Parameters
exc_type:type[BaseException] | NoneException type, if any.
exc_val:BaseException | NoneException instance, if any.
exc_tb:types.TracebackType | NoneTraceback object, if any.
Returns
NoneNo return value.
Raises
ExceptionIf release fails without an earlier protected-operation failure.
def __init__(self, backend: Any, key: str, timeout: float | None = None): (source)

Initialize the lock for key on backend.

Parameters
backend:typing.AnyRaw cache backend.
key:strCache key to lock on.
timeout:float | NoneFile acquisition deadline, database acquisition deadline and lease, or aiocache lease, in seconds. None leaves file/database acquisition unbounded and uses the default lease where a lease applies.
Returns
NoneNo return value.
__slots__: tuple[str, ...] = (source)

Declare the instance attribute slots reserved by this class.

_backend = (source)

Raw cache backend.

_impl: asyncio.Lock | RedLock | None = (source)

Underlying lock implementation selected for the cache backend.

Cache key to lock on.

Ownership token used to identify the current holder.

_timeout = (source)

Store-specific acquisition timeout or lease duration in seconds.