Skip to main content

Chargewire ADBC: one native driver for every ADBC language. By GizmoData.

CI PyPI version Python 3.10 or later PyPI downloads ADBC 1.12 ADBC conformance suite passing Follows the ADBC driver style guide Chargewire protocol Go core Python bindings No gRPC Tested with Hardcharger Apache 2.0 license GizmoData

Query any Chargewire server from Python, with Arrow results.


🔌 What is it?

A Python ADBC driver for the Chargewire protocol: SQL over plain HTTP, with results, parameters and bulk uploads as Arrow IPC streams. It is generic: it talks to any Chargewire server.

The driver itself is a native Go library (libadbc_driver_chargewire) bundled in the platform wheel; this package adds a DB-API 2.0 connect().

It needs Python 3.10 or newer, with pyarrow 16.0.0+ and adbc-driver-manager 1.8.0+, which pip installs with it.

🚀 Usage

from adbc_driver_chargewire import dbapi

with dbapi.connect(
    uri="chargewire://db.example.com:31337",  # HTTPS; add ?tls=false for plain HTTP
    username="joe",
    password="…",
) as conn:
    with conn.cursor() as cur:
        cur.execute(operation="SELECT n_name FROM nation WHERE n_nationkey = ?", parameters=[24])
        print(cur.fetch_arrow_table())

        cur.execute(operation="CREATE TABLE t (id INTEGER)")  # runs right away
        cur.adbc_ingest(table_name="t", data=my_arrow_table, mode="append")

connect() takes:

Argument Meaning
uri chargewire://host:port[/base-path] (TLS), ?tls=false for plain HTTP; https:// and http:// URLs work too. profile://name names a connection profile.
username, password Password sign-in (any characters, : included).
access_token A Chargewire access token obtained elsewhere, instead of a password.
auth_type "password" (default), "client_certificate" ("mtls"): sign in with tls_client_cert/tls_client_key alone, no password (the server binds the token to the certificate), or "oauth_browser": sign in through a browser with the server's identity provider (servers with capability oauth_browser).
open_browser Browser sign-in: True (default) opens the system's browser, False prints the sign-in URL to stderr, a string is the command that opens it.
oauth_timeout_seconds Browser sign-in: how long the person has to sign in (default 300).
resume_timeout Seconds to keep sending a request again while the server answers server_resuming (a stopped server starting again because you connected), each time after its Retry-After (default 600; 0: fail at once).
tls_root_certs CA certificates to trust (PEM text or file path).
tls_client_cert, tls_client_key Client certificate for mutual TLS (PEM text or path).
tls_skip_verify Skip certificate verification (development only; off unless set).
catalog, db_schema Make these current for the session. db_schema is one schema name in catalog (in the server's default catalog without it) and is never split at a dot: for the schema reports of the catalog lake, pass catalog="lake", db_schema="reports".
autocommit True by default; False starts a transaction (conn.commit(), conn.rollback()).
profile An ADBC connection profile (needs adbc-driver-manager 1.11.0 or newer, which resolves it).
db_kwargs, conn_kwargs Any other driver option, e.g. chargewire.query.async.

Driver options are in adbc_driver_chargewire.DatabaseOptions, ConnectionOptions and StatementOptions; the repository README lists them all.

By default, on a server that offers it, a large result is read over up to 8 connections at once (StatementOptions.RESULT_PARTITIONS), and an adbc_ingest of two batches or more is sent as up to 8 parts at once and committed as one, all or nothing (StatementOptions.INGEST_PARTS). Set either to "1" for one stream; a partitioned ingest's rows land in no defined order.

Errors are adbc_driver_manager exceptions whose details carry the server's error code (b"chargewire.code", e.g. b"sql_error") and request id (b"chargewire.request_id").

🔒 Read-only sessions

Request server-enforced read-only mode when opening the connection:

from adbc_driver_chargewire import dbapi

with dbapi.connect(
    uri=uri,
    username=username,
    password=password,
    read_only=True,
) as conn:
    with conn.cursor() as cur:
        cur.execute(operation="SELECT 42 AS answer")
        print(cur.fetchone())  # (42,)

read_only=True sets the ADBC specification's standard option adbc.connection.readonly (standard options keep the adbc. prefix; this driver's own are chargewire.*), which is how other languages ask for it and what conn_kwargs can still carry.

Here uri, username, and password are your server connection details. The option is sent in the session-creation request, before session setup. The driver requires options.read_only: true in the server's response. An older server that rejects or ignores the option causes an error; the driver never falls back to writable mode. Connections that omit the option continue to work with older servers.

A lazy connection to a stopped server confirms the mode at its first operation; reading the option also opens and confirms it. Read-only is one-way, even before a lazy session opens, and is requested and confirmed again on replacement sessions. Open a separate connection to write. Setting the option to "true" on an existing connection requests the same restriction; the server may refuse until you end an active transaction. Attaching with the option restricts that shared session too.

Read-only limits SQL writes as defined by the server's Chargewire implementation. It does not grant additional read permissions or sandbox installed extension code.

🛠️ Development

See the repository: build the library with make -C go lib, then pip install -e "python[test]". Unit tests need no server; the integration tests start the server named by CHARGEWIRE_ADBC_TEST_SERVER_BINARY and fail without it.


GizmoData
Built by GizmoData

Hardcharger™ and GizmoData™ are trademarks of GizmoData LLC.

Metadata

Release files for adbc-driver-chargewire 2.5.1

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

Built distributions (wheels)

Table of built distributions (wheels) for adbc-driver-chargewire 2.5.1
File Actions
adbc_driver_chargewire-2.5.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for adbc_driver_chargewire-2.5.1-py3-none-win_amd64.whl
adbc_driver_chargewire-2.5.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for adbc_driver_chargewire-2.5.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
adbc_driver_chargewire-2.5.1-py3-none-manylinux1_x86_64.manylinux_2_5_x86_64.whl Python 3 none Linux glibc 2.5+ x86-64 Details for adbc_driver_chargewire-2.5.1-py3-none-manylinux1_x86_64.manylinux_2_5_x86_64.whl
adbc_driver_chargewire-2.5.1-py3-none-macosx_13_0_x86_64.whl Python 3 none macOS 13.0+ x86-64 Details for adbc_driver_chargewire-2.5.1-py3-none-macosx_13_0_x86_64.whl
adbc_driver_chargewire-2.5.1-py3-none-macosx_13_0_arm64.whl Python 3 none macOS 13.0+ ARM64 Details for adbc_driver_chargewire-2.5.1-py3-none-macosx_13_0_arm64.whl

Total release size: 57.1 MB

Release files / adbc_driver_chargewire-2.5.1-py3-none-win_amd64.whl

Download URL adbc_driver_chargewire-2.5.1-py3-none-win_amd64.whl
Size 11.7 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
b1a5207509100db934590e997443b9283ca4f0dad593ab0fa9a8a69898d231e7
BLAKE2b-256 checksum
How to use checksums
4f2e1b5d226b44cbb97f33035844a0e04eb2e00e4d8fb7b52454998c5c1c8770
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 Nov 20, 2026.

Transparency log

Release files / adbc_driver_chargewire-2.5.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL adbc_driver_chargewire-2.5.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 11.2 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
c03d02c75af13ab8a33416c3abe3116f89aa45546517eb78fcd81c0255114f77
BLAKE2b-256 checksum
How to use checksums
11be37e5f532cb69d34124ad4a16bd3770146c8b7636e0d0e800df740c1d85a7
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 Nov 20, 2026.

Transparency log

Release files / adbc_driver_chargewire-2.5.1-py3-none-manylinux1_x86_64.manylinux_2_5_x86_64.whl

Download URL adbc_driver_chargewire-2.5.1-py3-none-manylinux1_x86_64.manylinux_2_5_x86_64.whl
Size 12.6 MB
Tags Linux glibc 2.5+ x86-64 Python 3
SHA-256 checksum
How to use checksums
6ee050524beba5eba6173d08abb9ffa427a49e0c082fd88f721305fce68a0146
BLAKE2b-256 checksum
How to use checksums
36e6ecf3c8d9c7b7d10d5bf8b874fd410aacd23267eda7f04dcc9d07b2e6d367
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 Nov 20, 2026.

Transparency log

Release files / adbc_driver_chargewire-2.5.1-py3-none-macosx_13_0_x86_64.whl

Download URL adbc_driver_chargewire-2.5.1-py3-none-macosx_13_0_x86_64.whl
Size 11.5 MB
Tags Python 3 macOS 13.0+ x86-64
SHA-256 checksum
How to use checksums
ab7a6d3744c282851e40864e06c372d98faec88e996d657ec185ecb2635fa79e
BLAKE2b-256 checksum
How to use checksums
7477091c8f0b55027ed749f6efe04a2e708c08746f6b45262ef3b8b2fec8c262
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 Nov 20, 2026.

Transparency log

Release files / adbc_driver_chargewire-2.5.1-py3-none-macosx_13_0_arm64.whl

Download URL adbc_driver_chargewire-2.5.1-py3-none-macosx_13_0_arm64.whl
Size 10.2 MB
Tags Python 3 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
649d48770cf3aeead7e74dfeb80bcb17ab8edcfb72cd7aebc504dc301817d560
BLAKE2b-256 checksum
How to use checksums
7d63d01144aefd4e8de12f20714d68e19730b71f28187758eb2dbc9511921c3c
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 Nov 20, 2026.

Transparency log

Security for adbc-driver-chargewire 2.5.1

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 adbc_driver_chargewire-2.5.1-py3-none-win_amd64.whl

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 Nov 20, 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