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.4.1 downloads Hardcharger server 2.4.1 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.4.1
$ python -m hardcharger download       # download (if needed) and print the binary's path
/home/me/.cache/hardcharger/v2.4.1/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.4.1

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.4.1
File Size Uploaded Provenance Actions
hardcharger-2.4.1.tar.gz 22.5 kB With provenance Details for hardcharger-2.4.1.tar.gz

Built distribution (wheel)

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

Total release size: 36.7 kB

Release files / hardcharger-2.4.1.tar.gz

Download URL hardcharger-2.4.1.tar.gz
Size 22.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7e3f2a0dfbf5e5041c1175db744793c4d42f8362b49929c28373ae2b535a7457
BLAKE2b-256 checksum
How to use checksums
69a62d8c9ce713bca4f6b1951b7731068963b0c1eff3c2e04a5e07ab6212bbda
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 Oct 29, 2026.

Transparency log

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

Download URL hardcharger-2.4.1-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
428515b6e94e88d1120d5b1e280ba9fdb63803a137d4268e8eb960227f36d14b
BLAKE2b-256 checksum
How to use checksums
56121ca28803c6d2b6278cc4d047ddfac1b7c8da80812ba36e746d21bba43f05
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 Oct 29, 2026.

Transparency log

Security for hardcharger 2.4.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

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

Select from 2 files

Attestation for hardcharger-2.4.1.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 29, 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