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.

module documentation

Serialize one checked-out DBAPI connection on one worker thread.

Class ThreadedWorker Serialize one checked-out DBAPI connection on one worker thread.
Async Function _complete_cleanup Complete database cleanup without replacing an existing ordinary failure.
Function _diagnostic_error Redact native SQL diagnostics before passing them to failure reporting.
Async Function _rollback_or_invalidate Discard a checkout when rollback fails before its release to the pool.
Async Function _wait_for_completion Drain a worker result while shielding only a successful completion notice.
async def _complete_cleanup(operation: Awaitable[object], primary: BaseException | None): (source)

Complete database cleanup without replacing an existing ordinary failure.

Parameters
operation:collections.abc.Awaitable[object]Cleanup owned by the database context.
primary:BaseException | NoneFailure already propagating from that context, if any.
Returns
NoneNo return value.
def _diagnostic_error(error: BaseException) -> BaseException: (source)

Redact native SQL diagnostics before passing them to failure reporting.

Parameters
error:BaseExceptionError observed while completing or releasing database work.
Returns
BaseExceptionSanitized query error for SQLAlchemy failures; otherwise the same error.
async def _rollback_or_invalidate(operation: Awaitable[object], invalidate: Callable[[], Awaitable[None]]): (source)

Discard a checkout when rollback fails before its release to the pool.

Parameters
operation:collections.abc.Awaitable[object]Native rollback or transaction-exit operation already owned by cleanup.
invalidate:collections.abc.Callable[[], collections.abc.Awaitable[None]]Discard the associated checkout without another pool reset.
Returns
NoneNo return value.
Raises
sqlalchemy.exc.SQLAlchemyErrorOriginal rollback failure after invalidation has been attempted.
async def _wait_for_completion(future: asyncio.Future[T], *, on_cancel: Callable[[T], Awaitable[None]] | None = None) -> T: (source)

Drain a worker result while shielding only a successful completion notice.

Parameters
future:asyncio.Future[T]Worker operation whose result must be collected before cleanup.
on_cancel:Callable[[T], Awaitable[None]] | None, optionalCleanup for resources completed after cancellation.
Returns
TCompleted result when the caller was not cancelled.
Raises
BaseExceptionPropagate worker failures unless cancellation already takes precedence.