compara
Extremely fast table comparison: two tables on a composite key, with counts, per-column statistics and a self-contained HTML report. One tool for every recurring comparison: a nightly export against yesterday's, a CSV against the Parquet a warehouse emits, a migration's source against its target.
Faster software for a better planet — less energy, less compute, more time for life.
- Reads CSV, TSV, JSON (newline-delimited or one array of objects) and Parquet, and the two sides need not be in the same format.
- Ten million rows × 20 columns in under a second on four cores, CSV or Parquet (benchmarks).
- Reads and writes object storage and the web directly (
s3://,gs://,az://,https://), with each cloud's own credentials, and fetches only the Parquet columns it compares (object storage). - One static binary, and a distroless container image; the report is a single HTML file with nothing to host.
- Exit codes made for pipelines:
0identical,1differences,2error,3duplicate keys (with--fail-on-dups).
Install
Prebuilt binaries for Linux (x86_64, aarch64), macOS (arm64, x86_64) and Windows (x64) are on the releases page, and the same binaries through package managers:
| Channel | Command |
|---|---|
| Cargo | cargo install --locked compara |
| pip / uv | pip install compara · uv tool install compara |
| Homebrew | brew install andrey-usa/tap/compara |
| Scoop | scoop bucket add andrey-usa https://github.com/andrey-usa/scoop-bucket then scoop install compara |
| Docker | docker run --rm -v "$PWD:/data" ghcr.io/andrey-usa/compara compare a.csv b.csv -k id |
Quick start
$ compara compare examples/orders_2026-08.csv examples/orders_2026-09.csv -k order_id,line_no -i updated_at
A 800 rows | B 799 rows | matched 787 (changed 102) | added 10 | removed 12 | duplicate keys A 1, B 1 | engine turbo, 0.011s
$ echo $?
1
$ compara compare examples/orders_2026-08.csv examples/orders_2026-09.csv -k order_id,line_no -i updated_at -o report.html
A 800 rows | B 799 rows | matched 787 (changed 102) | added 10 | removed 12 | duplicate keys A 1, B 1 | engine turbo, 0.001s
Report: report.html (20 KB)
Two monthly order exports from the repository's examples/, keyed on
(order_id, line_no), with updated_at left out. Exit code 1 says they
differ; the report holds the counts, per-column statistics and the changed,
added, removed and duplicate rows. More: Everyday comparisons,
and every option of compare: compare options.
For AI agents
- Skill:
compara skillprints the guide an agent reads to use this version of compara. - Machine-readable result:
--json summary.json(or--json -for standard output) writes the counts and per-column statistics, in the shape docs/contract.schema.json gives. - Exit codes:
0identical,1differences,2error,3duplicate keys with--fail-on-dups;--exit-zerofor a job whose output is the report. - Read-only by default:
comparewithout-o,--jsonor--export-dirwrites nothing;--summarymakes that a promise and refuses any flag that would write. - Docs as markdown: llms.txt lists every page of the
docs site, each one also served as
.md.
The loop an agent runs: compara columns on each file to choose the key,
compare --summary for the counts, then --json - for the columns that
changed and --export-dir for the rows.
Benchmarks
Two tables of 20 columns compared on a composite key (-k account_id,txn_id -i updated_at), every tool's unchanged, changed, added and removed counts checked identical, on GitHub's ubuntu-latest (AMD EPYC 9V45 96-Core Processor, 4 cores, 15 GB), bench-contenders run 42782167828, 2026-11-10:
| input, both files | compara 0.6.0 | DuckDB 2.0.0 | Polars 2.1.0 |
|---|---|---|---|
| 1M rows, CSV, 368 MB | 0.08 s · 0.2 s · 411 MB | 1.90 s · 5.3 s · 1,213 MB | 2.10 s · 8.3 s · 2,262 MB |
| 1M rows, Parquet, 161 MB | 0.11 s · 0.3 s · 317 MB | 1.10 s · 1.9 s · 1,358 MB | 2.11 s · 7.4 s · 2,430 MB |
| 10M rows, CSV, 3,679 MB | 0.74 s · 2.2 s · 4,031 MB | 14.59 s · 53.7 s · 8,797 MB | out of memory after 12 s, at 13,345 MB |
| 10M rows, Parquet, 1,609 MB | 0.85 s · 2.7 s · 2,739 MB | 6.40 s · 23.9 s · 7,001 MB | out of memory after 9 s, at 13,345 MB |
Each cell: wall time, best of 3 · CPU time (user and system) · peak memory, of the best run; fastest in bold. DuckDB and Polars run from Python, and their time starts at their first read, after the interpreter's start and the import. A tool the runner's kernel stopped for lack of memory says so.
No other tool did better than compara by more than 2% on any measure in this run.
The method, every run and object storage: Benchmarks.
Documentation
The docs site, https://andrey-usa.github.io/compara/, has the same parts for every tool:
- Start: Install · Quick start · Everyday comparisons
- Guides: Compare tables in object storage and on the web · Run compara in a container, in CI or in Kubernetes · Name a recurring comparison
- Concepts: Engines and formats
- Reference: compare options · The JSON summary · compara --help
- Agents: For AI agents · Skill
- Benchmarks: Results · Where compara is not ahead
- Project: Changelog · Contributing · Security
For agents: llms.txt lists every page as markdown, and llms-full.txt is the whole site in one file.
Contributing
Building, testing and the performance gate: CONTRIBUTING.md.
License
MIT: LICENSE.
Metadata
Release files for compara 0.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| compara-0.6.1-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for compara-0.6.1-py3-none-win_amd64.whl |
| compara-0.6.1-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details for compara-0.6.1-py3-none-manylinux_2_28_x86_64.whl |
| compara-0.6.1-py3-none-manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64 | Details for compara-0.6.1-py3-none-manylinux_2_28_aarch64.whl |
| compara-0.6.1-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details for compara-0.6.1-py3-none-macosx_11_0_arm64.whl |
| compara-0.6.1-py3-none-macosx_10_12_x86_64.whl | Python 3 | none | macOS 10.12+ x86-64 | Details for compara-0.6.1-py3-none-macosx_10_12_x86_64.whl |
Total release size: 24.7 MB
Release files / compara-0.6.1-py3-none-win_amd64.whl
| Download URL | compara-0.6.1-py3-none-win_amd64.whl |
|---|---|
| Size | 5.0 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
821610486f2389d8eb15283183bdf05f07bb545b039939dc3bef58ca90dffd56
|
|
BLAKE2b-256 checksum How to use checksums |
11a63c72423ec433896f57db4557deca39dbc53b825489276e41479c8fb1ea08
|
| 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 10, 2026.
Transparency logRelease files / compara-0.6.1-py3-none-manylinux_2_28_x86_64.whl
| Download URL | compara-0.6.1-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 5.1 MB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
331d896be1a07b6eccfc05a2d73c273d9e44481c7d341d3cf214435e127e0d41
|
|
BLAKE2b-256 checksum How to use checksums |
a01d7908e3c783a11e525fcdb91f02964ff8f651a5cf3eca0b3d28cb20ef0469
|
| 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 10, 2026.
Transparency logRelease files / compara-0.6.1-py3-none-manylinux_2_28_aarch64.whl
| Download URL | compara-0.6.1-py3-none-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 4.8 MB |
| Tags | Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
e422cd44fd3f76c0dd1668707e42c246f2e5332ee51afafd19bad3b957be1364
|
|
BLAKE2b-256 checksum How to use checksums |
af0c2f6e9529f9ba0fadcf6e99e0f95b7654c150c94f95baf25cb31de336d9f0
|
| 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 10, 2026.
Transparency logRelease files / compara-0.6.1-py3-none-macosx_11_0_arm64.whl
| Download URL | compara-0.6.1-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 4.4 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
591db9e987db77cebb0e681209e5616bbe46dc6881880948760250a0933d4adc
|
|
BLAKE2b-256 checksum How to use checksums |
2093d66e0abaa7e27f9deda3c751ee0776f2d5d10468ccf8535c6ee64f8fd87a
|
| 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 10, 2026.
Transparency logRelease files / compara-0.6.1-py3-none-macosx_10_12_x86_64.whl
| Download URL | compara-0.6.1-py3-none-macosx_10_12_x86_64.whl |
|---|---|
| Size | 5.3 MB |
| Tags | Python 3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
6e497495a467c348804971552431df66294f752faf51989096b6622fe461500b
|
|
BLAKE2b-256 checksum How to use checksums |
834a5af720c6564933628a7c865ed0bb97715e9d3f2ba75beb62a95d12796dca
|
| 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 10, 2026.
Transparency logSecurity for compara 0.6.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.
Attestation for compara-0.6.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 10, 2026.
Transparency logA 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.