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 Database(BaseEntity): (source)
Represent the general database configuration.
| Method | __post |
Validate and normalize the 'default' and 'connections' attributes. |
| Instance Variable | connections |
The different database connections available to the application. |
| Instance Variable | default |
The name of the default database connection to use. Accepts a ConnectionName enum member or a plain string (e.g. 'sqlite'). |
Inherited from BaseEntity:
| Class Method | _cached |
Retrieve field definitions and normalized types cached by class. |
| Method | get |
Describe field names, normalized types, defaults, and metadata. |
| Method | to |
Convert the dataclass instance to a recursively copied dictionary. |
| Class Variable | __slots__ |
Undocumented |
Validate and normalize the 'default' and 'connections' attributes.
Validates that the 'default' attribute is a valid ConnectionName member or a string corresponding to one. Ensures that the 'connections' attribute is an instance of Connections or a dictionary. Raises an exception if validation fails.
| Parameters | |
self:Database | The instance of the Database class. |
| Returns | |
None | This method does not return a value. |