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 TableCreation: (source)

Constructor: TableCreation(schema, name)

View In Hierarchy

Async context manager returned by Schema.create.

async with schema.create(name) as table: yields a orionis.database.schema.Blueprint so columns can be declared inside the block; the table is created on exit unless the block raised an exception.

Async Method __aenter__ Start a fluent, per-table column declaration block.
Async Method __aexit__ Create the table with the collected columns, unless it raised.
Method __init__ Store the pending table declaration request.
Class Variable __slots__ Declare the instance attribute slots reserved by this class.
Instance Variable __blueprint Table blueprint being converted into a schema operation.
Instance Variable __name The name of the table to create.
Instance Variable __schema The schema instance that will perform the creation.
async def __aenter__(self) -> Blueprint: (source)

Start a fluent, per-table column declaration block.

Returns
orionis.database.schema.BlueprintCollector used to declare columns via method calls.
Raises
RuntimeErrorIf this context already owns an unfinished declaration.
async def __aexit__(self, exc_type: type[BaseException] | None, exc: BaseException | None, traceback: TracebackType | None) -> bool: (source)

Create the table with the collected columns, unless it raised.

Parameters
exc_type:type[BaseException] or NoneThe exception type raised inside the block, if any.
exc:BaseException or NoneThe exception instance raised inside the block, if any.
traceback:types.TracebackType or NoneThe traceback for the raised exception, if any.
Returns
boolFalse to always propagate exceptions raised in the block.
def __init__(self, schema: schema_module.Schema, name: str): (source)

Store the pending table declaration request.

Parameters
schema:orionis.database.schema.schema.SchemaThe schema instance that will perform the creation.
name:strThe name of the table to create.
Returns
NoneNo return value.
__slots__: tuple[str, ...] = (source)

Declare the instance attribute slots reserved by this class.

__blueprint: Blueprint | None = (source)

Table blueprint being converted into a schema operation.

The name of the table to create.

__schema = (source)

The schema instance that will perform the creation.