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.
Undocumented
| Class | _ |
Escape binary parameters independently of aiomysql's removed converter. |
| Function | _config |
Extract a trimmed text value from a configuration mapping. |
| Function | _configure |
Install safe binary conversion on one adapted aiomysql connection. |
| Function | _enum |
Extract the primitive value from a possible enum member. |
| Function | _is |
Report whether a SQLite configuration targets an in-memory database. |
| Function | _mysql |
Build the MySQL session commands for a configuration. |
| Function | _normalize |
Normalize a boolean-like configuration value to ON or OFF. |
| Function | _oracle |
Build the URL query parameters for an Oracle connection. |
| Function | _oracle |
Build the engine URL for an Oracle connection. |
| Function | _pgsql |
Build the asyncpg connect arguments for a PostgreSQL connection. |
| Function | _server |
Build the URL query parameters for host-based drivers. |
| Function | _server |
Build the engine URL for host-based drivers. |
| Function | _session |
Build the per-connection session statements for a configuration. |
| Function | _sqlite |
Build the PRAGMA statements for a SQLite configuration. |
| Function | _sqlite |
Build the engine URL for a SQLite connection. |
| Function | _yes |
Normalize a boolean-like configuration value to yes or no. |
| Function | build |
Build the engine URL for a connection configuration. |
| Function | configure |
Apply driver-specific session settings to a freshly built engine. |
| Function | engine |
Build keyword options for an engine factory. |
| Function | missing |
Build the exception raised when a DB driver package is absent. |
| Function | resolve |
Extract and validate the driver name from a connection configuration. |
| Constant | _ASYNC |
Undocumented |
| Constant | _ASYNC |
Undocumented |
| Constant | _DEFAULT |
Undocumented |
| Constant | _IDENTIFIER |
Undocumented |
| Constant | _MYSQL |
Undocumented |
| Constant | _MYSQL |
Undocumented |
| Constant | _SQLITE |
Undocumented |
| Constant | _SYNC |
Undocumented |
| Constant | _SYNC |
Undocumented |
Install safe binary conversion on one adapted aiomysql connection.
PyMySQL 1.2.3 keeps escape_bytes_prefixed as a noncallable import alias; aiomysql 0.3.2 calls that alias for every bytes parameter. Hex literals keep binary storage working without downgrading PyMySQL or patching its modules.
| Parameters | |
dbapiobject | SQLAlchemy DBAPI adapter exposing its underlying driver connection. |
| Returns | |
None | Replace only this connection's binary escape path when available. |
Build the MySQL session commands for a configuration.
Applies the connection charset and collation through SET NAMES and the strict (or relaxed) sql_mode preset, mirroring the behavior of mainstream frameworks.
| Parameters | |
config:dict | MySQL connection configuration. |
| Returns | |
tuple of str | Session commands to run on each new pooled connection. |
Build the asyncpg connect arguments for a PostgreSQL connection.
Maps sslmode to the driver ssl argument and forwards the configured search_path and charset as server settings.
| Parameters | |
config:dict | PostgreSQL connection configuration. |
| Returns | |
dict | Driver connect arguments; empty when nothing is configured. |
Build the engine URL for host-based drivers.
Covers MySQL, PostgreSQL, and SQL Server connections addressed by host, port, and database name.
| Parameters | |
driver:str | Normalized driver name. |
config:dict | Connection configuration. |
dialect:str | SQLAlchemy dialect name to build the URL for. |
| Returns | |
URL | Engine URL with credentials, host, port, and database. |
Build the engine URL for a SQLite connection.
The engine URL is always derived from the database path; the informational url key (sync-style DSN) is intentionally ignored.
| Parameters | |
config:dict | SQLite connection configuration. |
dialect:str | SQLAlchemy dialect name to build the URL for. |
| Returns | |
URL | SQLite engine URL. |
Build the engine URL for a connection configuration.
| Parameters | |
config:dict | Connection configuration produced by the database config entities. |
sync:bool, optional | Whether to select the blocking DBAPI dialect instead of the async one. |
| Returns | |
URL | Engine URL for the configured driver. |
| Raises | |
UnsupportedDriverException | If the driver has no registered dialect. |
Apply driver-specific session settings to a freshly built engine.
For SQLite this installs a connect hook applying the configured PRAGMA settings; for MySQL it applies the connection charset, collation, and strict mode on every new pooled connection.
| Parameters | |
engine:AsyncEngine | Engine to configure. |
config:dict | Connection configuration. |
| Returns | |
None | This function does not return a value. |
str, cause: ModuleNotFoundError, *, sync: bool = False) -> MissingDatabaseDependencyException:
(source)
¶
Build the exception raised when a DB driver package is absent.
| Parameters | |
driver:str | Orionis driver name whose package is missing. |
cause:ModuleNotFoundError | Original import error raised by the engine. |
sync:bool, optional | Whether the missing package is the blocking (synchronous) driver instead of the default async one. |
| Returns | |
MissingDatabaseDependencyException | Exception with an actionable uv installation hint. |
Undocumented
| Value |
|
Undocumented
| Value |
|
Undocumented
| Value |
|
Undocumented
| Value |
|