Skip to main content

DataCache

Tests PyPI

Download a dataset once, verify it, and reuse the local file on later runs. DataCache handles streaming downloads, gzip/ZIP decompression, tar-tree installation, offline inspection and SQLite caches built from pandas DataFrames, for Python applications including OpenVax libraries such as pyensembl.

Install

Python 3.11 or newer is required; CI tests Python 3.11–3.14.

python -m pip install datacache
# Optional HTML-table conversion:
python -m pip install "datacache[html]"

Quickstart

Download a file once, then reuse its local path on later calls:

from datacache import Cache

cache = Cache("my-project")
url = "https://raw.githubusercontent.com/openvax/datacache/master/LICENSE"
path = cache.fetch(url, filename="LICENSE", timeout=30)
print(path)

# Reuses the cached file without a network request, even in a later process.
assert cache.fetch(url, filename="LICENSE") == path

Replace the URL and filename with your dataset. Existing files are reused until you refresh them with force=True, or periodically with expire_after; DataCache doesn't ask the server whether a file has changed. Add show_progress=True to display a download bar; no extra installation is needed.

Guides

The guides are also published at https://openvax.github.io/datacache/.

Dependencies and progress display

tqdm is installed by default; existing download APIs enable displays with show_progress=True, while materialize enables them by default. Quiet use does not import tqdm or configure your application's logging. The old datacache[progress] install syntax remains supported as a compatibility alias.

The existing pandas dependency range is unchanged; upgrading DataCache does not introduce a pandas 1.5 requirement. CI covers pandas 1.4.4, 1.5.3, and current releases on supported Python versions.

Development

python -m pip install -e ".[test]"
./lint-and-test.sh
python -m examples.basic_usage

Tests use local files, mocked responses, and local HTTP servers. They do not depend on external dataset servers. See CI for the Python, dependency, and operating-system combinations exercised.

Build the site with python -m pip install -r requirements-docs.txt and ./docs.sh.

License

Apache 2.0; see LICENSE.

Metadata

Release files for datacache 1.29.3

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

Source distribution (sdist)

Source distribution for datacache 1.29.3
File Size Uploaded Provenance Actions
datacache-1.29.3.tar.gz 296.3 kB Without provenance Details for datacache-1.29.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for datacache 1.29.3
File Interpreter ABI Platform Actions
datacache-1.29.3-py3-none-any.whl Python 3 none any Details for datacache-1.29.3-py3-none-any.whl

Total release size: 410.0 kB

Release files / datacache-1.29.3.tar.gz

Download URL datacache-1.29.3.tar.gz
Size 296.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e2cdf9ea293a324a68b70178b16bcdbd85a974a33f66f293b6cb2d766036ee52
BLAKE2b-256 checksum
How to use checksums
44ccbc55177683a1cab92da417454afb5556fbb764d14030ef35b3adb543b71f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.6

Release files / datacache-1.29.3-py3-none-any.whl

Download URL datacache-1.29.3-py3-none-any.whl
Size 113.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8cff53b1d2cbdad4d788c4b44c71bb378f61b43f3fd06697668094bb1c74521a
BLAKE2b-256 checksum
How to use checksums
dcbb7a4e23f5e867b6e077ea90b7b11d1c07b69d834cb131019f6730d977754b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.6

Security for datacache 1.29.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

1.29.3 This release

2 release files No provenance

0.4.7

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