cherrybin
A SQLite-backed, content-addressed archive for benchmark datasets that:
- live on a shared network filesystem which handles one big file well but handles many small files poorly,
- are read far more often than they're written, with updates coming from a single writer at a time (never concurrent),
- are organized into named, overlapping "benchmarks" that often share files with each other, and
- evolve over time as the benchmark suite changes.
Instead of one giant tar you unpack in full every time, cherrybin
stores every file's content once (deduped by SHA-256 hash) in a single
.db file, and maps benchmark names to the files they need. You check
out only the benchmark(s) you're about to run, and shared files are
never duplicated on disk, in the archive, or over the network.
pip install -e .
Concepts
- Archive: a single SQLite file (
blobstable +benchmark_filestable). Deliberately just one file, so copying/transferring it over a network filesystem is one big sequential operation instead of many small ones. - Build: done locally, against a fast local disk with reliable
file locking. Scans a source tree laid out as
<source>/<benchmark_name>/<relative/path>, hashes each file, and only stores blobs that aren't already present. - Publish: copies the finished local archive to the shared drive
under a new versioned filename (
archive_v42.db) and atomically flips acurrent.txtpointer. Readers only ever open a fully-written file — there's no window where a reader could see a half-written archive, so no file lock is needed for reads. An advisory lock (.publish.lock, using atomicO_CREAT|O_EXCLrather thanflock/fcntl, since real file locks are unreliable over NFS/SMB) only guards against two people publishing at the same time. - Checkout: opens the shared archive read-only/immutable and materializes one benchmark's files into a local directory. A local hash-keyed blob cache means files shared across benchmarks, or unchanged between runs, are hardlinked rather than re-read from the archive.
Quick start
# Build a local archive from a source tree laid out as
# <source>/<benchmark_name>/<files...>
cherrybin build local.db /path/to/source_tree
# See what's in it
cherrybin list --db local.db
# Publish it to the shared drive
cherrybin publish local.db /mnt/shared/bench_archives --version v1
# Elsewhere (or later): check out just one benchmark
cherrybin checkout my_benchmark ./workdir/my_benchmark ./blob_cache \
--shared_dir /mnt/shared/bench_archives
# Update one benchmark's files and republish
cherrybin build local.db /path/to/source_tree --benchmark my_benchmark
cherrybin publish local.db /mnt/shared/bench_archives --version v2
# Drop a retired benchmark and reclaim its now-unreferenced blobs
cherrybin remove local.db old_benchmark
cherrybin gc local.db
cherrybin checkout and cherrybin list both accept either --db <path> (a direct path to an archive file) or --shared_dir <dir> (a
directory containing current.txt, always resolving to the latest
published version).
Development
make install # editable install with dev dependencies
make test # pytest
make lint # ruff
License
BSD-3-Clause
Metadata
Release files for cherrybin 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cherrybin-0.2.0.tar.gz | 25.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cherrybin-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.0 kB
Release files / cherrybin-0.2.0.tar.gz
| Download URL | cherrybin-0.2.0.tar.gz |
|---|---|
| Size | 25.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
546147551e5e5d5152de80f61ac453561cd7652336ca0a39f8403cd9fabe4eaf
|
|
BLAKE2b-256 checksum How to use checksums |
40b6008ee38ad6ed6b4fae400dbaf51bc8a64917e9cd52ce030935d726a23db8
|
| 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 Sep 10, 2026.
Transparency logRelease files / cherrybin-0.2.0-py3-none-any.whl
| Download URL | cherrybin-0.2.0-py3-none-any.whl |
|---|---|
| Size | 21.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e4c635474b55b3182ae2e6e0b99c3081d6c6a56cd64fd33a077a0a1421408695
|
|
BLAKE2b-256 checksum How to use checksums |
7d3f711b7d57c7df15601ca2c93778d9ea01c5c1e285c7045a7fa2beb9c107ae
|
| 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 Sep 10, 2026.
Transparency log