Skip to main content

Hardcharger™

PyPI: hardcharger PyPI: adbc-driver-hardcharger Hardcharger Warp SQL 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.

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 0.3.0
$ python -m hardcharger download       # download (if needed) and print the binary's path
/home/me/.cache/hardcharger/v0.3.0/linux-amd64/bin/hardcharger-server

The download

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.0.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.0.0
File Size Uploaded Provenance
hardcharger-2.0.0.tar.gz 20.4 kB With provenance Details

Built distribution (wheel)

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

Total release size: 34.3 kB

Release files / hardcharger-2.0.0.tar.gz

Download URL hardcharger-2.0.0.tar.gz
Size 20.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7b58feedfaff10f3751f1f0b1b13a56df88a59336a904387c855dde5cfe9128d
BLAKE2b-256 checksum
How to use checksums
c4cf2fe2fe3adbdc042c90f0c10fac8ad2e722bfd398f9a9a1826ed0435ed6e4
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 21, 2026.

Transparency log

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

Download URL hardcharger-2.0.0-py3-none-any.whl
Size 13.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4bb0159f6ee51a09ee6803a03cbbd59ed38576544394fb51ecd151f9c28d8cef
BLAKE2b-256 checksum
How to use checksums
b650a5bbec2068781edf377a41559c89059c6762670961ae795ba5495d70da4c
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 21, 2026.

Transparency log

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

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

Select from 2 files

Attestation for hardcharger-2.0.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 Oct 21, 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