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

class ITransaction(ABC): (source)

Known subclasses: orionis.database.Transaction

View In Hierarchy

Contract for a database transaction usable as an async context manager.

Entering the context begins a transaction (or a savepoint when one is already active); leaving it commits on success and rolls back when an exception escapes the block.

Async Method __aenter__ Begin the transaction and enter the context.
Async Method __aexit__ Finalize the transaction when leaving the context.
Class Variable __slots__ Undocumented
@abstractmethod
async def __aenter__(self) -> ITransaction: (source)

Begin the transaction and enter the context.

Returns
ITransactionThe active transaction context.
Raises
TransactionExceptionIf the transaction cannot be started.
@abstractmethod
async def __aexit__(self, exc_type: type[BaseException] | None, exc: BaseException | None, traceback: TracebackType | None) -> bool: (source)

Finalize the transaction when leaving the context.

Parameters
exc_type:type of BaseException or NoneException class raised inside the block, if any.
exc:BaseException or NoneException instance raised inside the block, if any.
traceback:TracebackType or NoneTraceback associated with the exception, if any.
Returns
boolAlways False so exceptions propagate to the caller.
__slots__: tuple = (source)

Undocumented