readdata
Read repository files and structured data releases transparently—locally, over HTTP(S), from GitHub or Zenodo, or in the browser (Pyodide / marimo WebAssembly).
readdata provides two small, complementary APIs with isolated dependencies:
Repo/repo_file(core —urllib3only): resolve individual repository files (.csv,.trc,.c3d,.txt, images, archives) locally first, falling back to an atomic cached HTTP(S) download with optional SHA-256 verification.Release(optional[release]extra —duckdb+fsspec): open manifest-backed data releases (metadata.json) from a local directory, an HTTP mirror, or a numbered Zenodo record with lazy DuckDB SQL views over Parquet and seekable binary streams (including byte-range reads in Pyodide).
Installation
For repository/notebook file access (lightweight, pure Python):
pip install readdata
For manifest-backed Parquet/DuckDB releases and remote streaming:
pip install "readdata[release]"
For remote binary streaming without DuckDB:
pip install "readdata[http]"
1. Repository files (Repo & repo_file)
Designed for notebooks and scripts that should read a local checkout when present and automatically fetch a temporary cached copy when opened standalone (e.g., in molab, marimo.app, Google Colab, or GitHub Pages WebAssembly):
from readdata import Repo, repo_file
# Configure a GitHub repository once (e.g., in a BMC tutorial notebook)
bmc = Repo.github("BMClab/BMC", ref="master")
walk = bmc.file("data/walk.trc")
# Optional SHA-256 verification
sample = bmc.file("data/walk.trc", sha256="...")
# Or resolve a single file directly from any HTTP(S) base URL
path = repo_file(
"data/walk.trc",
base_url="https://raw.githubusercontent.com/BMClab/BMC/master/",
)
Local lookup walks upward from start_dir (defaulting to marimo.notebook_dir() when running inside marimo, otherwise the current working directory). Pass local=False to force fetching from the remote URL.
2. Structured data releases (Release)
Designed for versioned datasets whose root directory contains a metadata.json file mapping resource names to relative paths (and optional bytes and zenodo_filename fields):
{
"resources": {
"trials": {"path": "trials.parquet", "bytes": 41200},
"features": {"path": "features/pressure.parquet", "zenodo_filename": "features_pressure.parquet"},
"scans": {"path": "scans.zip", "bytes": 182400120}
}
}
Open a local directory, HTTP(S) mirror, Zenodo record, or resolve automatically (environment variable → local directory → remote fallback):
from zipfile import ZipFile
from readdata import Release
# Local first (env var or local directory with metadata.json), else Zenodo
rel = Release.auto("data", env="PPDS_DATA", fallback=Release.zenodo(24544934))
# Query Parquet resources lazily with DuckDB
with rel.connect(["trials", "features"]) as con:
rows = con.sql("SELECT * FROM trials LIMIT 5").fetchall()
# Stream a binary archive using byte ranges without downloading the whole file
with rel.open_resource("scans") as stream, ZipFile(stream) as archive:
mesh = archive.read("scans/s001l_foot.stl")
In Pyodide/WebAssembly, Release automatically uses synchronous Web Worker XMLHttpRequest byte-range reads registered as an fsspec filesystem for DuckDB—no httpfs extension required.
License
MIT License. See LICENSE.
Metadata
Release files for readdata 0.1.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 |
|---|---|---|---|---|
| readdata-0.1.1.tar.gz | 18.1 kB | With provenance | Details for readdata-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| readdata-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for readdata-0.1.1-py3-none-any.whl |
Total release size: 30.6 kB
Release files / readdata-0.1.1.tar.gz
| Download URL | readdata-0.1.1.tar.gz |
|---|---|
| Size | 18.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6679f548b9a842c73943ac9aa35560846cd0749455e308ebf2b83f83912f4f02
|
|
BLAKE2b-256 checksum How to use checksums |
017307dee4a35f83c16d1b0f2a1bc71cd8b0a107c28af30906d9354c63f2bcb7
|
| 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 Dec 4, 2026.
Transparency logRelease files / readdata-0.1.1-py3-none-any.whl
| Download URL | readdata-0.1.1-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
65370bdb117924336b5c75991efb2ccd69b20a5123d19bc031193d4011f57889
|
|
BLAKE2b-256 checksum How to use checksums |
fa1c328d5190fe22b9625670643f2f30acfe785569e716f701852bba4120cd6a
|
| 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 Dec 4, 2026.
Transparency logSecurity for readdata 0.1.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 readdata-0.1.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 Dec 4, 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.