Skip to main content

data-cli

CI Coverage PyPI Python

Command-line tool for downloading datasets published by CZ Biohub. Resolves a collection ID to its constituent datasets and downloads files from S3 and HTTP, with progress bars, size estimates, and dry-run accounting.

Installation

To install the OPS data CLI, run:

pip install biohub-data-cli

Quick start

See what a collection contains without downloading:

ops-data download collection <collection-id> --dry-run

Download a collection to the current directory:

ops-data download collection <collection-id>

Download multiple collections to a specific directory, skipping the prompt:

ops-data download collection <id-a> <id-b> -o ./data -y

Download only specific datasets from a collection:

ops-data download collection <collection-id> --dataset dataset-1,dataset-2

Files land under <outdir>/<collection-slug>/<dataset-slug>/.

Commands

ops-data download collection IDS...

Download one or more collections by ID.

Option Description
-o, --outdir PATH Output directory. Defaults to ..
-y, --yes Skip the size-estimate confirmation prompt.
--dataset SLUGS Comma-separated dataset slugs to download a subset of the collection. Only valid with a single collection.
--dry-run Print per-dataset size statistics without downloading. Mutually exclusive with -y.
--no-resume Ignore cached listing state and re-list/re-download from scratch.

Dry run resolves every S3 URI (listing prefixes, heading objects) to report exact byte totals per dataset. HTTP URLs are not sized during dry run and surface as a warning in the summary.

Filtering datasets with --dataset downloads only the named datasets from a collection instead of all of them, e.g. --dataset dataset-1,dataset-2. Slugs are downloaded in the order given, duplicates are ignored, and an unknown slug fails with the list of available slugs. Run --dry-run first to see the available slugs. Filtering applies to a single collection, so it can't be combined with multiple IDs.

Confirmation prompt shows the aggregate size estimate before any bytes move. Pass -y to skip it in scripts.

Failures are collected and reported at the end. The process exits non-zero if any download failed, but other downloads continue — one bad URL won't abort the run.

Development

This project uses uv for dependency management.

Install dependencies (including dev extras):

uv sync

Run tests:

uv run pytest

Run tests with coverage report:

uv run pytest --cov=biohub_data_cli --cov-report=term-missing

Run the CLI from a checkout:

uv run ops-data --help

Integration tests

Tests marked integration hit real S3 buckets / HTTP servers and are deselected by default. Run them explicitly:

uv run pytest -m integration

Code of Conduct

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to opensource@chanzuckerberg.com.

Reporting Security Issues

If you believe you have found a security issue, please responsibly disclose by contacting us at security@chanzuckerberg.com.

Metadata

Release files for biohub-data-cli 0.5.0

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

Source distribution (sdist)

Source distribution for biohub-data-cli 0.5.0
File Size Uploaded
biohub_data_cli-0.5.0.tar.gz 27.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for biohub-data-cli 0.5.0
File Interpreter ABI Platform
biohub_data_cli-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 57.1 kB

Release files / biohub_data_cli-0.5.0.tar.gz

Download URL biohub_data_cli-0.5.0.tar.gz
Size 27.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3c050d90b150e45d7d3fcd693c62dfe0486e684e1cbaaa6c4aa7d9062e0e7858
BLAKE2b-256 checksum
How to use checksums
eb92b7897ea77b228bc27d77876b177e9435162857493989d7be87c06f5cbd0e
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 15, 2026.

Transparency log

Release files / biohub_data_cli-0.5.0-py3-none-any.whl

Download URL biohub_data_cli-0.5.0-py3-none-any.whl
Size 29.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
140495959f6721afd496740865ae12805661d30f12d6fcfe0f02d4f6e95bb830
BLAKE2b-256 checksum
How to use checksums
de6910d87ce3b63f3391e47aea63ee5af5cc12eba2d5f020bf17ced8190085ec
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 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

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