Skip to main content

Hardcharger™

PyPI Downloads PyPI: hardcharger PyPI: adbc-driver-hardcharger Hardcharger Chargewire protocol Apache 2.0 license GizmoData

hardcharger

Run Hardcharger, GizmoData's DuckDB 2.0 server, from Python. The package has no dependencies: on first use it downloads the hardcharger-server release for your platform (Linux x86-64 and arm64, macOS on Apple silicon), checks it, caches it, and runs it as a subprocess. That makes a real server one line away in tests, notebooks and scripts.

Python package 2.13.0 downloads Hardcharger server 2.13.0 by default.

Package What it is
pip install hardcharger this package: the server
pip install adbc-driver-hardcharger the client, an ADBC/DB-API driver
pip install "hardcharger[adbc]" both, so Server.connect() returns a connection

Quick start

import hardcharger

with hardcharger.Server() as server, server.connect() as conn, conn.cursor() as cur:
    cur.execute(operation="SELECT 42 AS answer, HARDCHARGER_VERSION() AS version")
    print(cur.fetch_arrow_table())

Server() listens on a free port on 127.0.0.1, with an in-memory database and an administrator hardcharger whose password it generates (server.password). The credentials reach the server through its environment, so they don't show in ps.

Hand the server to any other client by its URI:

import hardcharger

with hardcharger.Server(database="analytics.duckdb", password="change-me") as server:
    print(server.uri)  # hardcharger://127.0.0.1:<port>?tls=false
    print(server.username, server.port, server.health_port)

TLS is tls_cert= and tls_key= (the URI drops ?tls=false, and connect() trusts that certificate); any other server option goes in extra_args=[...] or, as HARDCHARGER_* variables, in env={...}. hardcharger-server --help lists them all.

The command line

The package also installs hardcharger-server, which runs the downloaded server:

$ hardcharger-server --version
Hardcharger 2.13.0
$ python -m hardcharger download       # download (if needed) and print the binary's path
/home/me/.cache/hardcharger/v2.13.0/linux-amd64/bin/hardcharger-server

The download

Starting with 2.1.0, the hardcharger PyPI package version matches the server it downloads: hardcharger==2.1.0 uses server 2.1.0. A Python-only fix uses a post-release, such as 2.1.0.post1, and still downloads server 2.1.0. Release candidates use PEP 440 (2.1.0rc1) for Python and 2.1.0-rc.1 for the server. The separate ADBC driver has its own release cycle.

The release comes from gizmodata/hardcharger through the GitHub API. Its SHA-256 must match the digest GitHub recorded for the asset, and the unpacked server must report the expected version, or nothing is installed.

Public releases download anonymously. An optional GitHub token raises the API rate limit: HARDCHARGER_INSTALL_TOKEN, else GH_TOKEN, else the token of a signed-in gh (gh auth token). Set HARDCHARGER_INSTALL_TOKEN=none to force an anonymous download. The token is sent only to the GitHub API, never to the storage host the download is redirected to, and is never printed.

Variable Meaning
HARDCHARGER_SERVER_BINARY run this hardcharger-server instead of downloading one
HARDCHARGER_VERSION the server version to download (default: the one this package pins)
HARDCHARGER_CACHE_DIR where downloads are kept (default ~/.cache/hardcharger)
HARDCHARGER_INSTALL_TOKEN the GitHub token for the download (none: anonymous)

Tests

uv venv && uv pip install -e . --group dev
.venv/bin/python -m pytest -m "not integration and not download"      # no server needed
HARDCHARGER_PY_TEST_SERVER_BINARY=/path/to/hardcharger-server \
  .venv/bin/python -m pytest -m "integration and not client"           # the real server
.venv/bin/python -m pytest -m download                                 # a real download

The client tests also need adbc-driver-hardcharger installed. The integration, client and download tests fail, never skip, without their server, client or GitHub access.

License

Apache License 2.0.

This package is Python only and contains no third-party code. The hardcharger-server it downloads does: its release archive's THIRD_PARTY_NOTICES.md and THIRD_PARTY_NOTICES-web-ui.txt, which the install keeps beside bin/ (~/.cache/hardcharger/v<version>/<platform>/), list that software and its licences, and hardcharger-server --licenses prints them.


Built by GizmoData

Metadata

Release files for hardcharger 2.13.0

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

Source distribution (sdist)

Source distribution for hardcharger 2.13.0
File Size Uploaded Provenance Actions
hardcharger-2.13.0.tar.gz 24.1 kB With provenance Details for hardcharger-2.13.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hardcharger 2.13.0
File Interpreter ABI Platform Actions
hardcharger-2.13.0-py3-none-any.whl Python 3 none any Details for hardcharger-2.13.0-py3-none-any.whl

Total release size: 38.3 kB

Release files / hardcharger-2.13.0.tar.gz

Download URL hardcharger-2.13.0.tar.gz
Size 24.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ecc51b421a2e393becec4d5c3fe1c0201e5fca0a7a5ef259af8514b5b3db211b
BLAKE2b-256 checksum
How to use checksums
f705b11ea8399e346b00e4d6eb71678e3f83d652408edf69f21866bd59a5a652
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 15, 2026.

Transparency log

Release files / hardcharger-2.13.0-py3-none-any.whl

Download URL hardcharger-2.13.0-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3add9d9e4124f6061d86a06cc7b96010e660f7152f3d85e760733a0275ffb451
BLAKE2b-256 checksum
How to use checksums
c7e4f9f84804b50e7ff0546f9b458b0e515d519240e97975a9eaf3eb902086c4
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 15, 2026.

Transparency log

Security for hardcharger 2.13.0

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hardcharger-2.13.0.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 Nov 15, 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