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 | __acquire |
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. |
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 | |
None | No return value. |
| Raises | |
TimeoutError | If the lock cannot be acquired before timeout elapses. |
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 | |
exctype[BaseException] | None | Exception type, if any. |
excBaseException | None | Exception instance, if any. |
exctypes.TracebackType | None | Traceback object, if any. |
| Returns | |
None | No return value. |
| Raises | |
Exception | If release fails without an earlier protected-operation failure. |
Initialize the lock for key on backend.
| Parameters | |
backend:typing.Any | Raw cache backend. |
key:str | Cache key to lock on. |
timeout:float | None | File 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 | |
None | No return value. |