archivefs
Read-only fsspec filesystems for scientific data archives.
archivefs lets you address data in scientific repositories by accession/DOI and
pull it through the fsspec ecosystem — including DVC via
dvc import-url. A reviewer, collaborator, or student can then start from the same
raw data you used and reproduce your results, with checksum certainty and clear,
version-controlled provenance.
ega://EGAD00001006673 # dataset → directory
ega://EGAD00001006673/EGAF00004908765 # single file
zenodo://1486184/data.zip # record id …
zenodo://10.5281/zenodo.1486184 # … or DOI (concept DOI → latest version)
mendeley://10.17632/yzxtxn4nmd/4 # Mendeley Data (anonymous; EXPERIMENTAL, sha256)
geo://GSE176078 # supplementary / processed files
bia://S-BIAD599 # BioImage Archive: imaging depositions
dbgap://<phs_id>/<SRR_accession> # deferred, registered, refuses clearly
cbioportal://brca_metabric # cBioPortal via GitHub+git-lfs (EXPERIMENTAL, sha256)
cbioportal://brca_metabric@v1.0.0 # … pinned to a release tag or commit SHA
web://ars.els-cdn.com/content/image/<file>.xlsx # any HTTPS file; pin it with chiro://
What it does today
$ archivefs ls -l zenodo://1486184 # -R to recurse
853 B 49f6a914ea33912471512ac9228c6923 1486184/github-mark.zip
$ dvc import-url --no-download zenodo://1486184/github-mark.zip logo.zip
$ cat logo.zip.dvc
deps:
- md5: 49f6a914ea33912471512ac9228c6923 # download-free, from record metadata
size: 853
path: zenodo://1486184/github-mark.zip # an accession — never a secret
outs:
- path: logo.zip
$ dvc pull logo.zip.dvc # bytes on demand, verified by DVC
That order matters. --no-download then dvc pull gives you the data locally and
leaves the committed .dvc in the one shape a reviewer can pull from the archive
without you hosting a copy — which is the point of the exercise.
docs/decisions.md D17.
The same works for ega:// with credentials resolved from the environment at pull
time, and for geo:// and bia:// anonymously. For imaging, BIA's own OME-Zarr
conversions carry real MD5s, so that tier is download-free too:
$ dvc import-url --no-download --fs-config view=derived -- \
bia://S-BIAD599/<image-uuid>/<image>-thumbnail-128-128.png t.png
# md5 recorded without fetching bytes
Where an archive publishes no checksum (BIA's submitted files, bare GEO),
--no-download still records a correct md5 — but DVC computes it by streaming the
file, so it is not free. docs/decisions.md D14.
Why
- Reproducible provenance in one step.
dvc import-urlsomeone's archived data into your project and get download + a pinned, checksummed reference together. - Checksum certainty. Once data is in the DVC ecosystem you get integrity guarantees and version control over inputs.
- Look before you leap.
dvc list-url/archivefs lsshow what is in a record before you download it. - Works on anyone's deposits, whether or not our tooling was used to create them.
Install
pip install archivefs # Zenodo, GEO, EGA, BIA, Mendeley, cBioPortal, web
pip install archivefs[chiro] # + read .chiro.json manifests
pip install archivefs[dvc] # + the DVC adaptor
EGA needs no extra: the backend speaks EGA's REST API directly. (pyega3 pins
requests==2.26.0, which would hold the whole environment hostage — see
docs/decisions.md D2.)
Using it with DVC
DVC does not discover fsspec filesystems from entry points, so one extra step is needed once per environment:
$ archivefs dvc enable # writes a .pth that registers our protocols with DVC
$ archivefs dvc status # check it works
Why this is necessary, and what was tried instead, is
docs/decisions.md D4. archivefs dvc disable undoes it;
ARCHIVEFS_NO_DVC_HOOK=1 disables it for one command.
Design
A single package, a shared base, and thin per-backend byte-fetchers:
archivefs.base— path grammar, retry/error contract, length-checked and alignment-aware ranged reads, download-freeinfo(), read-only enforcement.archivefs.credentials— one chain for every archive: environment → a private on-disk file, and nothing else. Passing a credential as an option is refused, and DVC's own validator rejects the keys, so "no secret in the committed artifact" is a config parse error rather than a promise.archivefs.chiro—.chiro-first resolution: when a deposit carries a manifest, the manifest is the listing and the checksums.archivefs.zipsafe— zip-slip, symlink, zip-bomb and corruption checks, applied at listing time as well as on extraction.archivefs.backends.*— per-archive: how to list this repository, and where its bytes live. That is all that is left.
Credentials are always resolved at pull time from the local environment and
never written into the committed .dvc file.
Status
All working backends run against the live archives, with the plan's blocking question
resolved; mendeley:// and cbioportal:// are new and marked experimental.
| backend | state | download-free checksum | notes |
|---|---|---|---|
zenodo:// |
working | ✅ MD5 from record metadata | DOI + concept-DOI addressing; opt-in ZIP transparency |
ega:// |
working | ✅ MD5 of the decrypted bytes (verified) | OAuth2 + refresh-on-401; 16-byte range alignment |
geo:// |
working | ⚠️ none published — a .chiro sidecar fixes it |
index-based listing; SRA seam drawn, not built |
bia:// |
working | ⚠️ none for submitted files · ✅ MD5 for the OME-Zarr tier | two views; the imaging half of a split deposit |
mendeley:// |
working · experimental | ✅ sha256 (published) | DOI/id, versioned, folder-aware; anonymous frontend API |
cbioportal:// |
working · experimental | ✅ sha256 for git-lfs data files · ⚠️ derived for small metadata files | cBioPortal/datahub GitHub + git-lfs; version-pin by git ref |
web:// |
working · new | ⚠️ none as a rule — a .chiro pin fixes it |
any HTTPS file (journal supplements, release dirs); no listing; see decisions.md D45 |
dbgap:// |
deferred | — | registered so the error explains itself |
Verified end to end against the live archives: dvc list-url, dvc import-url --no-download (single file and directory), dvc update, dvc pull, and ZIP
transparency via --fs-config — including a controlled-access EGA pull whose .dvc
file contains neither username nor password, which DVC would now refuse to write in
any case. Plain fsspec.open() works with no adaptor at all, so pandas/Dask/Intake
reach the same data by the same path.
Live tests are opt-in (ARCHIVEFS_TEST_{EGA,ZENODO,GEO,DVC}=1); the default pytest
run is entirely offline.
Read next:
- All the documentation, indexed:
docs/README.md— a page per subcommand, the storage-option tables, and the guides below. - Importing from BIA, step by step:
docs/importing-from-bia.md— a collaborator-facing how-to, fromconda env updateto a committed.dvcfile. - Using any archive with DVC:
docs/using-with-dvc.md· credentials:docs/credentials.mdreviewer access:docs/reviewer-access.md - Decisions and deviations:
docs/decisions.md— thirty-three entries, including the resolved EGA checksum question, several undocumented archive behaviours worth knowing about, the credential routes closed off in D16, why a reviewer can only pull from the archive for a partial import (D17), and the silent bugs an adversarial review of the finished code turned up. - Ideas and extensions:
docs/ideas.md - Architecture:
docs/design.md· checklist:docs/plan.md
Relationship to Chirograph
Chirograph is a separate project
defining the .chiro.json manifest format (portable, content-addressed checksums +
provenance). archivefs optionally reads Chirograph manifests to gain
download-free checksums, drift detection, and friendly workspace layout — but works
without them (native listing, native checksums). Chirograph is the manifest
format; archivefs is the data-access layer. Neither depends on the other to be
useful.
Development
$ conda env update -n archivefs -f environment.yaml
$ conda activate archivefs
$ pytest # offline
$ pytest -m network # add ARCHIVEFS_TEST_*=1 to actually run these
$ ruff check src tests scripts
Metadata
Release files for archivefs 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| archivefs-0.3.1.tar.gz | 501.1 kB | With provenance | Details for archivefs-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| archivefs-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for archivefs-0.3.1-py3-none-any.whl |
Total release size: 701.3 kB
Release files / archivefs-0.3.1.tar.gz
| Download URL | archivefs-0.3.1.tar.gz |
|---|---|
| Size | 501.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b75385468ec5de06434428de3aa7705cda2767fee3e698b6a09de2965a633f22
|
|
BLAKE2b-256 checksum How to use checksums |
db61dac03655c84bd3c28e02f4532a60ae6831dbd66461725b7c5da198e56dcf
|
| 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 11, 2026.
Transparency logRelease files / archivefs-0.3.1-py3-none-any.whl
| Download URL | archivefs-0.3.1-py3-none-any.whl |
|---|---|
| Size | 200.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d69d4767222346d454e23b21c4366b9f9609998925ebb6cfdf80fb90e0550d2
|
|
BLAKE2b-256 checksum How to use checksums |
c1951e4c236729a8594f074b2e6f99edf4e26220818eba6e05f42a3d3eb536bf
|
| 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 11, 2026.
Transparency logSecurity for archivefs 0.3.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.
Attestation for archivefs-0.3.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 Nov 11, 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.