Skip to main content

pqbench

PyO3 bindings for pqbench. pip install builds a native wheel; a separate pqbench binary is not required. Two surfaces, one wheel:

  • pqbench.native — the commands: one function per library path, with the same arguments. Every name is the Rust function of the same path.
  • pqbench — the ergonomic surface over them: the client handles every command takes (Config, Dialect, Lake, Layer, Workspace) and walk, the whole-metastore walk composed once.

Install

pip install pqbench

The wheel carries every storage backend (delta-s3, iceberg-s3), so s3:// reads and Delta/Iceberg tables work out of the box. A storage read authenticates with the credentials= argument (a Credentials record) or, for bytemass, with env on its request — or with the process environment.

From a checkout:

pip install maturin
maturin develop --manifest-path python/Cargo.toml

The commands

Each command is the library function of the same path, under pqbench.native, and takes the handles and the resource's name like the Rust signature: the name is the AIP resource name a parent record carries, so a record feeds the next command as it is. credentials.get takes a table's name and returns its lease, the Credentials record a storage read takes, and a record is its model's class: record["path"], record.path and record.asdict() agree.

They are the walk's own pipeline — metastore, catalog, schema, table, credentials, partition, file, bytemass — and they stop at bytemass: the commands downstream of a byte-mass stream (viz, diff, profile, experiment), the standalone codec benchmarks (lz, compression) and skill are separate tools, and are not bound.

import asyncio
import pqbench
import pqbench.native

async def main():
    workspace = pqbench.Workspace(pqbench.Config("https://…", token="…"))
    lake = pqbench.Lake(workspace)

    # The walk, one function per resource. The I/O verbs are awaitable.
    await pqbench.native.metastore.get.get(workspace)
    await pqbench.native.catalog.get.get(workspace, "catalogs/dbx_samples")
    await pqbench.native.catalog.list.list(workspace)
    await pqbench.native.schema.list.list(workspace, "catalogs/dbx_samples")
    refs = await pqbench.native.table.list.list(
        workspace, "catalogs/dbx_samples/schemas/nyctaxi"
    )
    await pqbench.native.credentials.check.check(
        workspace, "catalogs/dbx_samples/schemas/nyctaxi/tables/trips"
    )
    # `credentials.get.get` is name -> lease: the lease is what a storage read
    # takes, from the table's name alone.
    credentials = await pqbench.native.credentials.get.get(workspace, refs[0]["name"])
    table = await pqbench.native.table.get.get(
        workspace,
        lake,
        refs[0]["name"], refs[0].get("uri"), credentials,
    )

    # `partition.list.list` and `file.list.list` stream (async iterators); the
    # single-value verbs are awaitable.
    async for partition in pqbench.native.partition.list.list(
        lake, table["name"], table["uri"], table.get("credentials"), 86_400_000
    ):
        async for file in pqbench.native.file.list.list(
            lake,
            table["name"],
            partition["uri"],
            partition.get("credentials"),
            partition["commit_versions"],
        ):
            # The pipeline stops here: `bytemass` measures the file's bytes.
            rows = await pqbench.native.bytemass.bytemass(
                lake, pqbench.native.BytemassRequest(inputs=[file.uri])
            )
            print(len(rows), file.uri)

asyncio.run(main())

The walk

walk is the one composition rather than a binding: it spans the catalog levels and descends every table the principal may read outside compute, with the tables in flight together (bounded by concurrency, 32 by default), and yields each table file.

async for file in pqbench.walk(workspace):
    print(file.uri)

catalog= descends one catalog instead of every readable one. A table that cannot be read is skipped (logged at debug), so a mixed metastore still walks; records stream, so the walk holds no more than a bounded queue of them.

The Unity Catalog API limits requests per endpoint and per workspace, so its calls are paced at requests_per_second — 15, one bucket per endpoint, and 0 turns pacing off. The storage reads are not paced: object storage has no such limit and retries its own. Anything skipped is counted in a warning when the walk ends, so a rate limit shows up as a count rather than as silently missing files.

bytemass is the last command: it reads what file.list.list yields — a path or URI per file — and returns one Bytemass per column, its chunks folded over the file's row groups.

columns = await pqbench.native.bytemass.bytemass(
    lake, pqbench.native.BytemassRequest(inputs=["s3://…/part-00000.parquet"])
)

samples/walk.py is a runnable walk over the whole metastore: it calls walk, spans every catalog and schema, descends the one catalog the principal may read outside compute, and prints each table file.

PQB_ENDPOINT=https://<workspace>.cloud.databricks.com PQB_TOKEN=<bearer> \
  AWS_REGION=us-east-2 python samples/walk.py

Configuration

Config(endpoint, token=None, dialect=Dialect.UNITY) carries the endpoint, the bearer, and the dialect (UNITY or ICEBERG); Layer(endpoint=None, token=None, dialect=None).resolve() combines configuration layers into a Config.

credentials is a Credentials record — what credentials.get returns — or the mapping of the same fields; a read given none falls back to the process environment. A request's env is the library's BTreeMap<String, String>, passed straight through. A BytemassRequest names inputs (paths or storage URIs) and env (the AWS_* options a remote read uses).

Publish to PyPI

.github/workflows/release-pypi.yml builds manylinux and macOS wheels with maturin and uploads them with PyPI trusted publishing — no token is stored. It has its own dispatch, after the matching tag is released: gh workflow run release-pypi.yml, or Publish to PyPI from the Actions tab. Publishing is separate because PyPI names the workflow file that may upload, and its trusted publisher does not accept a job defined in a workflow that another workflow calls.

Its version is the workspace's: scripts/version.sh sync writes [workspace.package] version from Cargo.toml into python/Cargo.toml before maturin reads it, and make check-version fails when the two disagree — python/ is its own crate and cannot inherit it.

Before the first upload:

  1. On PyPI, add a pending publisher for this repository: owner pqbench, project pqbench, workflow release-pypi.yml, environment pypi.
  2. In the GitHub repository settings, create an environment named pypi.
  3. Run the Publish to PyPI workflow.

Metadata

Release files for pqbench 0.0.7

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

Source distribution (sdist)

Source distribution for pqbench 0.0.7
File Size Uploaded Provenance Actions
pqbench-0.0.7.tar.gz 183.1 kB With provenance Details for pqbench-0.0.7.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pqbench 0.0.7
File Actions
pqbench-0.0.7-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for pqbench-0.0.7-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pqbench-0.0.7-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for pqbench-0.0.7-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
pqbench-0.0.7-cp39-abi3-macosx_13_0_x86_64.whl CPython 3.9 abi3 macOS 13.0+ x86-64 Details for pqbench-0.0.7-cp39-abi3-macosx_13_0_x86_64.whl
pqbench-0.0.7-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for pqbench-0.0.7-cp39-abi3-macosx_11_0_arm64.whl

Total release size: 70.1 MB

Release files / pqbench-0.0.7.tar.gz

Download URL pqbench-0.0.7.tar.gz
Size 183.1 kB
Tags Source
SHA-256 checksum
How to use checksums
02b82c98107b25cce9ceaa9177a1669e6f1a6f49a4a6210d08917408733ff1e1
BLAKE2b-256 checksum
How to use checksums
eb2577e98fc03cb5a207c1f261d69539cb35db949d3dc0a6ad406cb9bc3a3674
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 25, 2026.

Transparency log

Release files / pqbench-0.0.7-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pqbench-0.0.7-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 18.4 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
3c81b6fd0a484873b765ff3364d3a9d97f7d3e7ccacc4a4886e73d1b759d1b04
BLAKE2b-256 checksum
How to use checksums
2c5ed6f556ea904085e35ec8365012c4d84f840fc74a2da9bcce9b5885e9b6d8
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 25, 2026.

Transparency log

Release files / pqbench-0.0.7-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL pqbench-0.0.7-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 18.7 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
bc0f40a78862b653e71e3c74be348b09daf63039875e40904bf2f87af24a785c
BLAKE2b-256 checksum
How to use checksums
db1b3e1359703ec288a2ee4526dba8642a5c0595e448bdbc2f4cbb66a5cbd523
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 25, 2026.

Transparency log

Release files / pqbench-0.0.7-cp39-abi3-macosx_13_0_x86_64.whl

Download URL pqbench-0.0.7-cp39-abi3-macosx_13_0_x86_64.whl
Size 16.7 MB
Tags CPython 3.9 abi3 macOS 13.0+ x86-64
SHA-256 checksum
How to use checksums
2af3e33406c77f31b80cd49cc265b1c69d24613b1fd503c9e8892797f7d2ae41
BLAKE2b-256 checksum
How to use checksums
0ee1bae51199f42dc44ccf2d1f8a851e33ff4ff30d1da31f77cff71029e3b705
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 25, 2026.

Transparency log

Release files / pqbench-0.0.7-cp39-abi3-macosx_11_0_arm64.whl

Download URL pqbench-0.0.7-cp39-abi3-macosx_11_0_arm64.whl
Size 16.1 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4161ac6bd143691f36d405ec51079bf7cac05510a6935a6316e19f92fca867c7
BLAKE2b-256 checksum
How to use checksums
e7ceb261b07463cfa017072b9056d1294582e79a753350b499ed72e4ff1a7491
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 25, 2026.

Transparency log

Security for pqbench 0.0.7

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 pqbench-0.0.7.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 25, 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