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

View In Hierarchy

Precomputed metadata describing a model class.

Built once by the metaclass so hot paths (hydration, persistence) never perform reflection at runtime.

Method applyCasts Apply the declared casts to a raw attribute mapping in place.
Method isFillable Report whether an attribute accepts mass assignment.
Instance Variable accessors Accessor method names keyed by the attribute they expose.
Instance Variable appends Accessor-backed attributes added to the serialized output.
Instance Variable cast_lookup Precompiled cast handlers keyed by attribute name.
Instance Variable casts Declared cast names keyed by attribute name.
Instance Variable columns Column definitions keyed by attribute name.
Instance Variable connection Named connection used by the model, or None for default.
Instance Variable created_column Creation timestamp column, when present.
Instance Variable deleted_column Soft delete timestamp column, when the model soft deletes.
Instance Variable events Immutable (registration identity, listener) pairs keyed by event name.
Instance Variable fillable Attributes allowed for mass assignment.
Instance Variable global_scopes Constraints applied to every query, keyed by scope name.
Instance Variable guarded Attributes blocked from mass assignment.
Instance Variable hidden Attributes omitted from serialization.
Instance Variable incrementing Whether the primary key is auto-incrementing.
Instance Variable mutators Mutator method names keyed by the attribute they transform.
Instance Variable primary_key Name of the primary key column.
Instance Variable scopes Local scope method names keyed by their fluent call name.
Instance Variable table Table definition consumed by the SQL compiler.
Instance Variable table_name Logical table name of the model.
Instance Variable timestamps Whether the model maintains creation/update timestamps.
Instance Variable updated_column Update timestamp column, when present.
Instance Variable uses_unique_ids Whether the primary key is a client-generated unique identifier.
def applyCasts(self, attributes: dict[str, Any]) -> dict[str, Any]: (source)

Apply the declared casts to a raw attribute mapping in place.

Parameters
attributes:dictRaw attribute values, typically a database row.
Returns
dictThe same mapping with cast values applied.
def isFillable(self, key: str) -> bool: (source)

Report whether an attribute accepts mass assignment.

Parameters
key:strAttribute name to check.
Returns
boolTrue when the attribute can be mass assigned.
accessors: dict of str to str = (source)

Accessor method names keyed by the attribute they expose.

Accessor-backed attributes added to the serialized output.

cast_lookup: dict of str to Callable = (source)

Precompiled cast handlers keyed by attribute name.

casts: dict of str to str = (source)

Declared cast names keyed by attribute name.

Column definitions keyed by attribute name.

connection: str or None = (source)

Named connection used by the model, or None for default.

created_column: str or None = (source)

Creation timestamp column, when present.

deleted_column: str or None = (source)

Soft delete timestamp column, when the model soft deletes.

events: dict of str to tuple = (source)

Immutable (registration identity, listener) pairs keyed by event name.

Attributes allowed for mass assignment.

global_scopes: dict of str to Callable = (source)

Constraints applied to every query, keyed by scope name.

Attributes blocked from mass assignment.

Attributes omitted from serialization.

incrementing: bool = (source)

Whether the primary key is auto-incrementing.

mutators: dict of str to str = (source)

Mutator method names keyed by the attribute they transform.

primary_key: str = (source)

Name of the primary key column.

scopes: dict of str to str = (source)

Local scope method names keyed by their fluent call name.

Table definition consumed by the SQL compiler.

table_name: str = (source)

Logical table name of the model.

timestamps: bool = (source)

Whether the model maintains creation/update timestamps.

updated_column: str or None = (source)

Update timestamp column, when present.

uses_unique_ids: bool = (source)

Whether the primary key is a client-generated unique identifier.