Driver Manager#
The driver manager is a library that provides bindings to the ADBC C API. It delegates to dynamically-loaded drivers. This allows applications to use multiple drivers simultaneously, and decouple themselves from the specific driver.
The Python driver manager provides both low-level bindings that are essentially the same as the C API. If PyArrow is installed, it also provides high-level bindings that implement the DBAPI (PEP 249) standard.
Installation#
pip install adbc_driver_manager
Usage#
First create a AdbcDatabase
, passing driver
and
(optionally) entrypoint
. driver
must be the name of a library
to load, or the path to a library to load. entrypoint
, if
provided, should be the name of the symbol that serves as the ADBC
entrypoint (see AdbcDriverInitFunc
). Then, create a
AdbcConnection
.
import adbc_driver_manager
with adbc_driver_manager.AdbcDatabase(driver="adbc_driver_sqlite") as db:
with adbc_driver_manager.AdbcConnection(db) as conn:
pass
The Python bindings for each driver abstract these steps for you
behind a convenient connect
function.
API Reference#
See the API reference: adbc_driver_manager.