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

Execute one Core checkout and buffer its results on a reserved thread.

Async Class Method open Open a checkout and release late resources if the caller is cancelled.
Method __init__ Retain an open Core connection and the worker that opened it.
Method _closedTask Release the completed coordinator and its copied execution context.
Method _execute Consume the live cursor before the worker completes its operation.
Async Method _release Return the native checkout before joining its reserved worker.
Async Method begin Begin a root transaction on the reserved worker.
Async Method close Return the checkout and join its worker, including during cancellation.
Async Method execute Execute and materialize a statement entirely outside the event loop.
Async Method invalidate Discard a connection whose transaction could not be settled.
Async Method runSync Execute a Core schema callback on the connection's reserved worker.
Class Variable __slots__ Declare the instance attribute slots reserved by this class.
Instance Variable _close_task Shared checkout release coordinator while cleanup remains pending.
Instance Variable _closed Whether checkout release has started or already completed.
Instance Variable _connection Open blocking Core connection.
Instance Variable _worker Worker reserved for this checkout.
async def open(cls, engine: Engine) -> Self: (source)

Open a checkout and release late resources if the caller is cancelled.

Parameters
engine:sqlalchemy.engine.EngineBlocking engine supplying the checkout.
Returns
typing.SelfConnection with an independently reserved worker.
def __init__(self, connection: Connection, worker: ThreadedWorker): (source)

Retain an open Core connection and the worker that opened it.

Parameters
connection:sqlalchemy.engine.ConnectionOpen blocking Core connection.
worker:orionis.database.threaded.worker.ThreadedWorkerWorker reserved for this checkout.
Returns
NoneNo return value.
def _closedTask(self, pending: asyncio.Task[None]): (source)

Release the completed coordinator and its copied execution context.

Parameters
pending:asyncio.Task[None]Shared checkout release task that has reached a terminal state.
Returns
NoneNo return value.
def _execute(self, statement: Executable, parameters: Mapping[str, Any] | Sequence[Mapping[str, Any]] | None) -> ThreadedResult: (source)

Consume the live cursor before the worker completes its operation.

Parameters
statement:sqlalchemy.sql.expression.ExecutableCore statement to execute.
parameters:Mapping | Sequence[Mapping] | NoneStatement or batch bindings.
Returns
orionis.database.threaded.result.ThreadedResultFully buffered rows and result metadata.
async def _release(self): (source)

Return the native checkout before joining its reserved worker.

Returns
NoneNo return value.
async def begin(self) -> ThreadedTransaction: (source)

Begin a root transaction on the reserved worker.

Returns
orionis.database.threaded.transaction.ThreadedTransactionTransaction adapter retaining the same worker.
async def close(self): (source)

Return the checkout and join its worker, including during cancellation.

Concurrent close callers wait for the same native release and shutdown.

Returns
NoneNo return value.
async def execute(self, statement: Executable, parameters: Mapping[str, Any] | Sequence[Mapping[str, Any]] | None = None) -> ThreadedResult: (source)

Execute and materialize a statement entirely outside the event loop.

Parameters
statement:sqlalchemy.sql.expression.ExecutableCompiled Core statement or parameterized textual query.
parameters:Mapping | Sequence[Mapping] | None, optionalBindings for one statement or a batch.
Returns
orionis.database.threaded.result.ThreadedResultMemory-only result safe to consume after checkout release.
async def invalidate(self): (source)

Discard a connection whose transaction could not be settled.

Returns
NoneNo return value.
async def runSync(self, callback: Callable[..., T], *args: object, **kwargs: object) -> T: (source)

Execute a Core schema callback on the connection's reserved worker.

Parameters
callback:collections.abc.Callable[..., T]Callback receiving the blocking Core connection first.
*args:objectAdditional callback arguments.
**kwargs:objectAdditional callback options.
Returns
TCallback result after the blocking work completes.
__slots__: tuple[str, ...] = (source)

Declare the instance attribute slots reserved by this class.

Shared checkout release coordinator while cleanup remains pending.

Whether checkout release has started or already completed.

_connection = (source)

Open blocking Core connection.

Worker reserved for this checkout.