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

Apply new seeders exactly once on the selected database connection.

Files under database/seeders are discovered in lexical filename order. The application container builds each seeder so constructors can receive dependencies. Each seeder and its tracking row commit in the same transaction. The unique tracking key acts as a database-level claim when runs overlap.

Method __discover Find local Seeder subclasses in deterministic filename order.
Async Method __ensureTrackingTable Create the tracking table, tolerating a concurrent creator.
Async Method __getRan Read committed tracking rows in insertion order.
Method __init__ Initialize the runner with the application and connection manager.
Async Method __isRecorded Check whether another transaction committed this seeder.
Async Method __runStep Claim, run and commit one seeder and its tracking row.
Method __seedersPath Return the application's configured seeder directory.
Async Method seed Run every discovered seeder that has no committed tracking row.
Class Variable __slots__ Undocumented
Instance Variable __app Undocumented
Instance Variable __conn_manager Undocumented
Instance Variable __discovered_cache Undocumented
def __discover(self) -> dict[str, type[Seeder]]: (source)

Find local Seeder subclasses in deterministic filename order.

Returns
dict of str to type of SeederSeeder classes keyed by persisted filename stem.
Raises
ValueErrorIf more than one class resolves to the same persisted name.
async def __ensureTrackingTable(self, connection: IConnection): (source)

Create the tracking table, tolerating a concurrent creator.

Parameters
connection:IConnectionSelected database connection.
Returns
NoneThe table is available for tracking operations.
async def __getRan(self, connection: IConnection) -> list[dict[str, Any]]: (source)

Read committed tracking rows in insertion order.

Parameters
connection:IConnectionConnection holding the tracking table.
Returns
list of dictTracking rows ordered by primary key.
def __init__(self, app: IApplication, conn_manager: IConnectionManager): (source)

Initialize the runner with the application and connection manager.

Parameters
app:IApplicationApplication providing the seeder directory.
conn_manager:IConnectionManagerManager resolving configured database connections.
Returns
NoneComplete the documented operation without returning a value.
async def __isRecorded(self, connection: IConnection, name: str) -> bool: (source)

Check whether another transaction committed this seeder.

Parameters
connection:IConnectionConnection holding the tracking table.
name:strSeeder filename stem.
Returns
boolWhether the tracking row is committed.
async def __runStep(self, connection: IConnection, name: str, seeder_cls: type[Seeder], batch: int, events: SeederEvents) -> bool: (source)

Claim, run and commit one seeder and its tracking row.

Parameters
connection:IConnectionConnection shared by the seeder and tracking transaction.
name:strPersisted seeder filename stem.
seeder_cls:type of SeederClass to instantiate and execute.
batch:intBatch assigned to this invocation.
events:SeederEventsProgress callbacks.
Returns
boolWhether this call executed the seeder.
def __seedersPath(self) -> Path: (source)

Return the application's configured seeder directory.

Returns
PathAbsolute path under database/seeders.
async def seed(self, *, connection: str | None = None, events: SeederEvents | None = None) -> list[str]: (source)

Run every discovered seeder that has no committed tracking row.

Parameters
connection:str or None, optionalNamed database connection, or the configured default.
events:SeederEvents or None, optionalProgress callbacks for executed seeders.
Returns
list of strSeeder names completed by this call, in execution order.
__slots__: tuple[str, ...] = (source)

Undocumented

Undocumented

__conn_manager = (source)

Undocumented

__discovered_cache: dict[str, type[Seeder]] | None = (source)

Undocumented