Skip to main content

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

  1. the ADBC_ODBC_DRIVER environment variable (an explicit value that does not exist is an error, not a silent fallback);
  2. a copy bundled inside this package (see below);
  3. the ADBC driver manifest named odbc — odbc.toml under $ADBC_DRIVER_PATH, <sys.prefix>/etc/adbc/drivers, ~/.config/adbc/drivers, /etc/adbc/drivers, … — as installed by cmake --install build --prefix "$VIRTUAL_ENV";
  4. common install locations: <sys.prefix>/lib, /usr/local/lib, /usr/lib, /usr/lib/<arch>-linux-gnu, and a build/ tree next to a source checkout (so pip install -e python works right after cmake --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.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for adbcbridge 0.1.4
File Size Uploaded Provenance Actions
adbcbridge-0.1.4.tar.gz 24.4 kB With provenance Details for adbcbridge-0.1.4.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for adbcbridge 0.1.4
File Actions
adbcbridge-0.1.4-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for adbcbridge-0.1.4-py3-none-win_amd64.whl
adbcbridge-0.1.4-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 for adbcbridge-0.1.4-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
adbcbridge-0.1.4-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 for adbcbridge-0.1.4-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
adbcbridge-0.1.4-py3-none-macosx_14_0_arm64.whl Python 3 none macOS 14.0+ ARM64 Details for adbcbridge-0.1.4-py3-none-macosx_14_0_arm64.whl

Total release size: 815.6 kB

Release files / adbcbridge-0.1.4.tar.gz

Download URL adbcbridge-0.1.4.tar.gz
Size 24.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6dcebcfef39f1aa394c564551a9fda6d40f0d617d567c198cbcb87369eb9f439
BLAKE2b-256 checksum
How to use checksums
a12d19a99064344e2df13b28775c01440eec84e4e73fd1fcc6fa28338d5706b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Release files / adbcbridge-0.1.4-py3-none-win_amd64.whl

Download URL adbcbridge-0.1.4-py3-none-win_amd64.whl
Size 157.2 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
7b9d0919571c9eb47043e907543af1fba118bb021ef73a410476b591827f9fb2
BLAKE2b-256 checksum
How to use checksums
8b5cbff07e17e036ea3015267be406f8c96e499281bd149b6ef3d4a6ad1ec9ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Release files / adbcbridge-0.1.4-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL adbcbridge-0.1.4-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 231.1 kB
Tags Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
9fc871ab003dbf4e6abe32e597133ebc15772a5a348c7504ee5bd4fb674a4050
BLAKE2b-256 checksum
How to use checksums
0ebc412f58bc3af32154e20a921324f8a70cb23e138c7d881d7d46a7f74a8bcb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Release files / adbcbridge-0.1.4-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl

Download URL adbcbridge-0.1.4-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Size 224.6 kB
Tags Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
ba6beb0f4459b68589a1689b43b86e62f28d29f6402ce075d4cabab710e0e556
BLAKE2b-256 checksum
How to use checksums
047644a00a7ae74d4425fd8dae4ebe55afe39cfaf6e2d9a7875f18dc71df9f44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Release files / adbcbridge-0.1.4-py3-none-macosx_14_0_arm64.whl

Download URL adbcbridge-0.1.4-py3-none-macosx_14_0_arm64.whl
Size 178.4 kB
Tags Python 3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
a78643bbc2e26ba6d5061f50f23fb2545f88462e21723e7fb81e266c114e214c
BLAKE2b-256 checksum
How to use checksums
e87ba2169f798fcd8f0341f9372e1b3528f3177a652304b38150f231bebe133d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Security for adbcbridge 0.1.4

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.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for adbcbridge-0.1.4.tar.gz

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 Oct 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page