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.
Attribute handling behavior shared by every model.
Provides mass assignment with fillable/guarded enforcement, cast application, and serialization helpers. The mixin operates on the _attributes mapping owned by the model instance.
| Method | exclude |
Return every attribute except the given keys. |
| Method | fill |
Mass assign the given attributes honoring the assignment rules. |
| Method | get |
Return a single attribute value through its accessor. |
| Method | has |
Report whether an attribute is served by an accessor. |
| Method | only |
Return a subset of attributes limited to the given keys. |
| Method | serialize |
Serialize the model for collection-level serialization. |
| Method | set |
Assign a single attribute applying its mutator and cast. |
| Method | to |
Serialize the visible attributes into a dictionary. |
| Method | to |
Serialize the visible attributes into a JSON string. |
| Class Variable | __slots__ |
Undocumented |
Mass assign the given attributes honoring the assignment rules.
| Parameters | |
attributes:dict | Attribute values keyed by column name. |
| Returns | |
Model | The same instance, enabling fluent chaining. |
| Raises | |
MassAssignmentException | If a key is not a column or is guarded from mass assignment. |
Return a single attribute value through its accessor.
A declared get<Name>Attribute accessor receives the stored value (None for computed attributes with no column) and its return value is what the caller sees.
| Parameters | |
key:str | Attribute name. |
default:Any, optional | Value returned when the attribute is absent. |
| Returns | |
Any | Attribute value, or the default when absent. |
Serialize the model for collection-level serialization.
| Returns | |
dict | Visible attribute values keyed by name. |
Assign a single attribute applying its mutator and cast.
A declared set<Name>Attribute mutator runs first and its return value is what gets stored; the declared cast is applied afterwards so both features compose.
| Parameters | |
key:str | Attribute name. |
value:Any | Raw value to assign. |
| Returns | |
None | This method does not return a value. |
Serialize the visible attributes into a dictionary.
Accessors are applied, attributes listed in hidden are omitted, and accessor-backed attributes listed in appends are added even though they have no column.
| Returns | |
dict | Visible attribute values keyed by name. |