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 IConnectionManager(ABC): (source)
Known subclasses: orionis.database.ConnectionManager
Define the contract for connection manager implementations.
| Method | add |
Register or replace a named connection configuration at runtime. |
| Method | config |
Retrieve the configuration for a named connection. |
| Method | connection |
Resolve the connection registered under the given name. |
| Async Method | disconnect |
Dispose one or all cached connections. |
| Method | get |
Return the name of the default connection. |
| Method | has |
Report whether a connection configuration exists. |
| Method | set |
Change the default connection name. |
| Class Variable | __slots__ |
Declare that this class introduces no additional instance slots. |
orionis.database.ConnectionManagerRegister or replace a named connection configuration at runtime.
A live connection built from a previous configuration keeps
serving until orionis.database.contracts.IConnectionManager.disconnect
is called for that name.
| Parameters | |
name:str | Connection name to register. |
config:dict | Driver configuration for the connection. |
| Returns | |
None | No return value. |
| Raises | |
ValueError | If the name is empty. |
TypeError | If the configuration is not a mapping. |
orionis.database.ConnectionManagerRetrieve the configuration for a named connection.
| Parameters | |
name:str or None, optional | Connection name as declared in the database configuration, or None for the default connection. |
| Returns | |
dict | The driver configuration for the connection. |
| Raises | |
orionis.database.ConnectionNotFoundException | If the connection is not declared in the configuration. |
orionis.database.ConnectionManagerResolve the connection registered under the given name.
The connection is built on first access and cached for reuse.
| Parameters | |
name:str or None, optional | Connection name as declared in the database configuration, or None for the default connection. |
| Returns | |
orionis.database.contracts.IConnection | Connection bound to its configuration. |
| Raises | |
orionis.database.ConnectionNotFoundException | If the connection is not declared in the configuration. |
orionis.database.ConnectionManagerReturn the name of the default connection.
| Returns | |
str | Default connection name as configured. |
orionis.database.ConnectionManagerChange the default connection name.
| Parameters | |
name:str | Connection name to use as the default; must already be declared in the configuration. |
| Returns | |
None | No return value. |
| Raises | |
orionis.database.ConnectionNotFoundException | If the connection is not declared in the configuration. |
orionis.database.ConnectionManagerDeclare that this class introduces no additional instance slots.