API surface
The top-level surface of informix_db and informix_db.aio. For full PEP 249 details, see the standard’s DB-API 2.0 spec.
Module-level
Section titled “Module-level”import informix_db
informix_db.connect(...) -> Connectioninformix_db.create_pool(...) -> Poolinformix_db.apilevel # "2.0"informix_db.threadsafety # 1informix_db.paramstyle # "numeric"from informix_db import aio
await aio.connect(...) -> aio.Connectionawait aio.create_pool(...) -> aio.Poolconnect()
Section titled “connect()”informix_db.connect( *, host: str, port: int = 9088, user: str, password: str, database: str | None, server: str, # DBSERVERNAME (not hostname) autocommit: bool = False, connect_timeout: float | None = None, read_timeout: float | None = None, keepalive: bool = False, client_locale: str = "en_US.8859-1", env: dict[str, str] | None = None, tls: bool | ssl.SSLContext = False,) -> ConnectionConnection
Section titled “Connection”| Method / property | Description |
|---|---|
cursor() | Returns a new Cursor. |
commit() | Commits the current transaction. |
rollback() | Rolls back the current transaction. |
close() | Closes the connection. Idempotent. |
transaction() | Context manager — commits on success, rolls back on exception. |
fast_path_call(routine, *args) | Direct UDF/SPL invocation, bypassing PREPARE/EXECUTE/FETCH. |
encoding | Resolved Python codec for client_locale. |
autocommit | Read-only after connect; set via connect(autocommit=...). |
closed | True after close(). |
Cursor
Section titled “Cursor”| Method / property | Description |
|---|---|
execute(sql, params=()) | Prepare + execute. Returns the cursor. |
executemany(sql, seq_of_params) | Pipelined batch execute. |
fetchone() | One row tuple, or None. |
fetchmany(size=arraysize) | List of row tuples. |
fetchall() | All remaining rows. |
scroll(value, mode="relative") | Scrollable cursor positioning. |
read_blob_column(sql, params) | Read a BLOB column → bytes. |
write_blob_column(sql, blob_data, params) | Write a BLOB column. |
read_clob_column(sql, params) | Read a CLOB column → str. |
write_clob_column(sql, clob_data, params) | Write a CLOB column. |
close() | Closes the cursor + releases server resources. |
description | Sequence of column descriptors per PEP 249. |
rowcount | Affected row count for DML; -1 for SELECT. |
arraysize | Default fetchmany() size. |
lastrowid | Server-assigned key for the last single-row INSERT. |
| Method | Description |
|---|---|
connection() | Context manager yielding a connection from the pool. |
close() | Closes all idle connections; waits for in-use to return. |
closed | True after close(). |
size | Current pool size. |
idle_count | Connections currently idle in the pool. |
aio.Pool is identical except its connection() is an async context manager and close() is async.
Exceptions
Section titled “Exceptions”Error├── Warning└── DatabaseError ├── InterfaceError ├── DataError ├── OperationalError │ └── PoolTimeout ├── IntegrityError ├── InternalError ├── ProgrammingError └── NotSupportedErrorSee Exceptions & error codes for the SQLCODE → exception mapping.