adbcBridge (Python)
Thin Python wrapper around adbcBridge, the ADBC
driver for any ODBC data source. It finds the libadbc_driver_odbc shared
library and hands it to adbc_driver_manager, so every ODBC driver on the
machine becomes an Arrow-native ADBC database.
pip install adbcbridge
import adbcbridge
with adbcbridge.connect(uri="Driver=SQLite3;Database=my.db;") as conn:
with conn.cursor() as cur:
cur.execute("SELECT * FROM t")
table = cur.fetch_arrow_table() # pyarrow.Table
connect() returns a plain adbc_driver_manager.dbapi.Connection, so the whole
ADBC DBAPI surface (cursor(), fetch_arrow_table(), adbc_ingest(),
adbc_get_objects(), …) is available.
API
adbcbridge.connect(uri=None, dsn=None, username=None, password=None,
driver_path=None, *, autocommit=False, conn_kwargs=None,
**options) -> adbc_driver_manager.dbapi.Connection
adbcbridge.driver_path() -> str # path of libadbc_driver_odbc.so
adbcbridge.odbc_drivers() -> list[OdbcDriver] # from odbcinst.ini
adbcbridge.odbcinst_ini() -> pathlib.Path | None
adbcbridge.odbc_driver_library(driver=None, *, uri=None, dsn=None) -> str | None
adbcbridge.preload_odbc_driver(driver=None, *, uri=None, dsn=None,
strict=False) -> str | None
import adbcbridge does not import pyarrow: adbc_driver_manager.dbapi is
imported inside connect(), after the ODBC driver named in the connection
string has been opened. A few ODBC drivers — MySQL Connector/ODBC is the one in
the wild — can only be loaded while libstdc++ has not yet been pinned to dynamic
thread-local storage, which importing pyarrow does. preload_odbc_driver() is
that step on its own, for programs that drive adbc_driver_manager or pyodbc
themselves; ADBCBRIDGE_PRELOAD=0 disables the automatic one in connect().
See docs/TROUBLESHOOTING.md.
Extra **options become database options: a bare name is prefixed with
adbc.odbc. (batch_size=4096 → adbc.odbc.batch_size), a dotted name is
passed through as given, and True/False become "true"/"false".
conn = adbcbridge.connect(
uri="Driver=/usr/lib/x86_64-linux-gnu/odbc/psqlodbcw.so;Server=127.0.0.1;Database=app;",
username="app", password="secret",
batch_size=4096, decimal_as_string=True, # adbc.odbc.*
)
Finding the driver library
driver_path() looks, in order, at
- the
ADBC_ODBC_DRIVERenvironment variable (an explicit value that does not exist is an error, not a silent fallback); - a copy bundled inside this package (see below);
- the ADBC driver manifest named
odbc—odbc.tomlunder$ADBC_DRIVER_PATH,<sys.prefix>/etc/adbc/drivers,~/.config/adbc/drivers,/etc/adbc/drivers, … — as installed bycmake --install build --prefix "$VIRTUAL_ENV"; - common install locations:
<sys.prefix>/lib,/usr/local/lib,/usr/lib,/usr/lib/<arch>-linux-gnu, and abuild/tree next to a source checkout (sopip install -e pythonworks right aftercmake --build build).
If nothing matches it raises adbcbridge.DriverNotFoundError.
Command line
adbcbridge query "Driver=SQLite3;Database=my.db;" "SELECT * FROM t"
adbcbridge query "Driver=SQLite3;Database=my.db;" "SELECT * FROM t WHERE i > ?" -p 3
adbcbridge query ... --format csv > out.csv # or --format schema, --limit N
adbcbridge drivers # ODBC drivers from odbcinst -j / odbcinst.ini
adbcbridge driver-path # which libadbc_driver_odbc.so would be used
Building a wheel with the driver bundled
The wheel is pure Python unless a driver library is around at build time, in
which case setup.py copies it into the package and tags the wheel for the
current platform:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build
python -m pip install build
python -m build --wheel python # picks up ./build/libadbc_driver_odbc.so
Point it somewhere else with ADBCBRIDGE_LIBRARY=/path/to/libadbc_driver_odbc.so
(or ADBCBRIDGE_BUILD_DIR=/path/to/cmake-build-tree). Without either, and with
no build/ tree, the wheel contains no binary and driver_path() falls back to
the manifest or a system-wide install at run time.
Tests
pip install -e python
SQLITE_ODBC_DRIVER=/path/to/libsqlite3odbc.so \
ADBC_ODBC_DRIVER=$PWD/build/libadbc_driver_odbc.so \
pytest python/tests
Apache-2.0.
Metadata
Release files for adbcbridge 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| adbcbridge-0.1.2.tar.gz | 24.3 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| adbcbridge-0.1.2-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| adbcbridge-0.1.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 | Details |
| adbcbridge-0.1.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64, Linux glibc 2.28+ ARM64 | Details |
| adbcbridge-0.1.2-py3-none-macosx_14_0_arm64.whl | Python 3 | none | macOS 14.0+ ARM64 | Details |
Total release size: 809.8 kB
Release files / adbcbridge-0.1.2.tar.gz
| Download URL | adbcbridge-0.1.2.tar.gz |
|---|---|
| Size | 24.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30f739579e2626c2fb63d733cb927400688dfb927acde510307e37e48ff933a9
|
|
BLAKE2b-256 checksum How to use checksums |
495a2165f454c7a62af6ad6573318e3c604f5d84f45ff149f74227472dedc4b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency logRelease files / adbcbridge-0.1.2-py3-none-win_amd64.whl
| Download URL | adbcbridge-0.1.2-py3-none-win_amd64.whl |
|---|---|
| Size | 152.0 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8788de3176ac3c6dc507de18480c77f14156d28f9adc602167789ec76b0f5542
|
|
BLAKE2b-256 checksum How to use checksums |
602212fcc7409b53a43d1d633e7d6ae8b6f95a756ee5e2afeed9f99cfaffb351
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency logRelease files / adbcbridge-0.1.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | adbcbridge-0.1.2-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 230.9 kB |
| Tags | Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
8b541a4088754300882409631c68527d531cd40a066479090a94ad14cfca6f57
|
|
BLAKE2b-256 checksum How to use checksums |
13ea5ba236d3aee8f5773c553b1f0c4a042f7754534c76c0a097e034a1405768
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency logRelease files / adbcbridge-0.1.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | adbcbridge-0.1.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 224.4 kB |
| Tags | Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
be3463a611ae070bc568e492a51df4ee0aa12b9e95edaaf2c7f224e5cd057f3d
|
|
BLAKE2b-256 checksum How to use checksums |
1f8f924c0eee728859df8fd88f968a1a230ba6a37bc3a9265e3c6f5ab1584315
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency logRelease files / adbcbridge-0.1.2-py3-none-macosx_14_0_arm64.whl
| Download URL | adbcbridge-0.1.2-py3-none-macosx_14_0_arm64.whl |
|---|---|
| Size | 178.1 kB |
| Tags | Python 3 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
54140bf48e2c4f3429fc50ccf22ea9f231b52969e8e4c5d31956025f125ebaee
|
|
BLAKE2b-256 checksum How to use checksums |
37af779ac16d4606ec4af7dcfa9d3e134110d434f3b727bbe77bf77a679f103c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.
Transparency log