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 ConnectionManager(IConnectionManager): (source)
Constructor: ConnectionManager(app)
Undocumented
| Method | __init__ |
Initialize the manager from the application configuration. |
| Method | __unknown |
Build the descriptive message for an unresolved connection name. |
| 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__ |
Undocumented |
| Instance Variable | _cached |
Undocumented |
| Instance Variable | _connections |
Undocumented |
| Instance Variable | _default |
Undocumented |
Initialize the manager from the application configuration.
| Parameters | |
app:IApplication | Application container providing the database configuration. |
| Returns | |
None | This method does not return a value. |
Register or replace a named connection configuration at runtime.
A live connection built from a previous configuration keeps
serving until disconnect is called for that name.
| Parameters | |
name:str | Connection name to register. |
config:dict | Driver configuration for the connection. |
| Returns | |
None | This method does not return a value. |
| Raises | |
ValueError | If the name is empty. |
TypeError | If the configuration is not a mapping. |
Retrieve the configuration for a named connection.
| Parameters | |
name:str or None, optional | Connection name to look up, or None for the default. |
| Returns | |
dict[str, Any] | The configuration dictionary for the requested connection. |
| Raises | |
ConnectionNotFoundException | If the connection is not declared in the configuration. |
Resolve 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 | |
IConnection | Connection bound to its configuration. |
| Raises | |
ConnectionNotFoundException | If the connection is not declared in the configuration. |
Change the default connection name.
| Parameters | |
name:str | Connection name to use as the default; must already be declared in the configuration. |
| Returns | |
None | This method does not return a value. |
| Raises | |
ConnectionNotFoundException | If the connection is not declared in the configuration. |