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 | |
Serialize one checked-out DBAPI connection on one worker thread. |
| Async Function | _complete |
Complete database cleanup without replacing an existing ordinary failure. |
| Function | _diagnostic |
Redact native SQL diagnostics before passing them to failure reporting. |
| Async Function | _rollback |
Discard a checkout when rollback fails before its release to the pool. |
| Async Function | _wait |
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 | None | Failure already propagating from that context, if any. |
| Returns | |
None | No return value. |
Redact native SQL diagnostics before passing them to failure reporting.
| Parameters | |
error:BaseException | Error observed while completing or releasing database work. |
| Returns | |
BaseException | Sanitized 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 | |
None | No return value. |
| Raises | |
sqlalchemy.exc.SQLAlchemyError | Original 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. |
onCallable[[T], Awaitable[None]] | None, optional | Cleanup for resources completed after cancellation. |
| Returns | |
T | Completed result when the caller was not cancelled. |
| Raises | |
BaseException | Propagate worker failures unless cancellation already takes precedence. |