Skip to content
Skills Library
Science & research · Automation

pooch

/pooch

Data file fetching and caching for geoscience applications. Download sample datasets with automatic caching, checksum verification, and multiple download sources. Use when the agent needs to: (1) Download datasets from URLs or DOIs, (2) Cache files locally with automatic verification, (3) Verify file integrity with SHA256/MD5 hashes, (4) Extract compressed archives (ZIP, TAR, GZIP), (5) Create data registries for reproducible workflows, (6) Fetch from Zenodo or other repositories.

Licence
MIT
Last repository change
15.09.2026

Assessment and security

98/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene13 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
3
Scripts
1
HTML comments
0
URLs in SKILL.md
7
Deprecation

No signals detected. Repository changed on 15.09.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 1 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/create_registry.py

What it does and when to use it

Data file fetching and caching for geoscience applications. Download sample datasets with automatic caching, checksum verification, and multiple download sources. Use when the agent needs to: (1) Download datasets from URLs or DOIs, (2) Cache files locally with automatic verification, (3) Verify file integrity with SHA256/MD5 hashes, (4) Extract compressed archives (ZIP, TAR, GZIP), (5) Create data registries for reproducible workflows, (6) Fetch from Zenodo or other repositories.

Original author description

Data file fetching and caching for geoscience applications. Download sample datasets with automatic caching, checksum verification, and multiple download sources. Use when the agent needs to: (1) Download datasets from URLs or DOIs, (2) Cache files locally with automatic verification, (3) Verify file integrity with SHA256/MD5 hashes, (4) Extract compressed archives (ZIP, TAR, GZIP), (5) Create data registries for reproducible workflows, (6) Fetch from Zenodo or other repositories.

How it works

  1. Quick Reference
  2. Key Functions
  3. Essential Operations
  4. Processor Options
  5. Cache Locations
  6. Error Handling
  7. When to Use vs Alternatives
  8. Common Workflows
  9. References
  10. Scripts
Original SKILL.md headings · 149 lines, 501 words
SKILL.md preview
---
name: pooch
description: |
  Data file fetching and caching for geoscience applications. Download sample
  datasets with automatic caching, checksum verification, and multiple download
  sources. Use when the agent needs to: (1) Download datasets from URLs or DOIs,
  (2) Cache files locally with automatic verification, (3) Verify file integrity
  with SHA256/MD5 hashes, (4) Extract compressed archives (ZIP, TAR, GZIP),
  (5) Create data registries for reproducible workflows, (6) Fetch from Zenodo
  or other repositories.
license: MIT
metadata:
  version: 1.0.1
  author: Geoscience Skills
  tags: '["Data Download", "Caching", "Reproducibility", "File Management", "Pooch", "Checksum", "Data Registry", "Scientific Data"]'
  dependencies: '["pooch>=1.7.0"]'
  complements: '["xarray"]'
  workflow_role: data-loading
  skill_type: domain
---

# Pooch - Data File Fetching

## Quick Reference

```python
import pooch

# Download single file
file_path = pooch.retrieve(
    url="https://example.com/data.csv",
    known_hash="sha256:abc123...",  # None to skip verification
    fname="data.csv",
    path=pooch.os_cache("myproject")
)

# Create registry for multiple files
REGISTRY = pooch.create(
    path=pooch.os_cache("myproject"),
    base_url="https://example.com/data/",
    registry={"data.csv": "sha256:abc123...", "model.nc": "sha256:def456..."}
)
data_file = REGISTRY.fetch("data.csv")

# Generate hash for local file
file_hash = pooch.file_hash("/path/to/file.csv")
```

## Key Functions

| Function | Purpose |
|----------|---------|
| `pooch.retrieve()` | Download single file with caching |
| `pooch.create()` | Create custom data registry |
| `pooch.file_hash()` | Generate SHA256/MD5 hash of file |
| `pooch.os_cache()` | Get OS-specific cache directory |

## Essential Operations

### Download Files
```python
# With hash verification
file_path = pooch.retrieve(
    url="https://example.com/data.nc",
    known_hash="sha256:abc123..."
)

# Without verification (development only)
file_path = pooch.retrieve(url="https://example.com/data.nc", known_hash=None)

# From Zenodo DOI
file_path = pooch.retrieve(
    url="doi:10.5281/zenodo.1234567/data.zip",
    known_hash="sha256:abc123..."
)
```

### Extract Archives
```python
# ZIP archive
files = pooch.retrieve(
    url="https://example.com/data.zip",
    known_hash="sha256:abc123...",
    processor=pooch.Unzip()
)

# Decompress single gzip file
file_path = pooch.retrieve(
    url="https://example.com/data.csv.gz",
    known_hash="sha256:abc123...",
    processor=pooch.Decompress(name="data.csv")
)
```

### Additional Options
```python
# Progress bar for large downloads
file_path = pooch.retrieve(url=url, known_hash=hash, progressbar=True)

# HTTP authentication
file_path = pooch.retrieve(
    url="https://example.com/protected/data.csv",
    known_hash=None,
    downloader=pooch.HTTPDownloader(auth=("user", "pass"))
)
```

## Processor Options

| Processor | Purpose |
|-----------|---------|
| `Unzip()` | Extract ZIP archives |
| `Untar()` | Extract TAR/TAR.GZ archives |
| `Decompress()` | Decompress gzip, bz2, lzma, xz |

## Cache Locations

| OS | Default Path |
|----|--------------|
| Linux | `~/.cache/<project>` |
| macOS | `~/Library/Caches/<project>` |
| Windows | `C:\Users\<user>\AppData\Local\<project>\Cache` |

## Error Handling

```python
try:
    file_path = pooch.retrieve(url=url, known_hash=hash)
except pooch.exceptions.HTTPDownloadError:
    print("Download failed - check URL")
except pooch.exceptions.DownloadError:
    print("Network issue")
```

## When to Use vs Alternatives

| Tool | Best For | Limitations |
|------|----------|-------------|
| **pooch** | Reproducible data downloads, hash verification, caching | Not a version control system |
| **urllib/requests** | Simple one-off downloads, custom HTTP logic | No caching, no hash verification |
| **DVC** | Data version control alongside git | Heavier setup, requires remote storage |
| **wget** | Quick command-line downloads | No Python integration, no caching logic |

**Use pooch when** you need reproducible data downloads with automatic caching and
integrity verification, especially for scientific data registries.

**Consider alternatives when** you need full data version control with git integration
(use DVC), simple one-off downloads without caching needs (use requests), or
command-line batch downloads (use wget).

## Common Workflows

### Set up reproducible data download with registry
- [ ] Identify all required data files and their URLs
- [ ] Generate SHA256 hashes with `pooch.file_hash()` for each file
- [ ] Create registry with `pooch.create()` specifying base URL and file hashes
- [ ] Fetch files with `REGISTRY.fetch()` in analysis scripts
- [ ] Add processors for compressed files (`Unzip()`, `Untar()`, `Decompress()`)
- [ ] Test registry by clearing cache and re-fetching
- [ ] Document registry in project README for collaborators

## References

- **[Registry Configuration](references/registry.md)** - Create and manage file registries

## Scripts

- **[scripts/create_registry.py](scripts/create_registry.py)** - Generate registry from local files
Files in this package (3)
  • SKILL.md 5 KB
  • references/registry.md 5 KB
  • scripts/create_registry.py 4 KB

Versions

The database has no other skills named pooch.

Database snapshot: 13.11.2026 · package version 7dca3eab542b (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100tpdc-fetch
    Use when Codex needs to search or download datasets from the National Tibetan Plateau Data Center (TPDC, data.tpdc.ac.cn), including open no-login datasets and login-assisted datasets. Unofficial community tool.
  • 95ensaio
    Fetch versioned Fatiando geoscience datasets with Ensaio and preserve their hashes, citations and data conventions. Use for reproducible sample-data acquisition and replacing supported RockHound datasets; the fetchers return paths for format-specific readers.
  • 100zenodo-skill
    Use whenever the user mentions Zenodo, depositing or publishing research artifacts (datasets, software, papers, posters) to Zenodo, minting a DOI for a dataset/code release, uploading files to a Zenodo record, creating a new version of a Zenodo deposit, or searching Zenodo…
  • 90figshare-data-download
    Download Figshare files via browser-only workflow (no web_fetch/curl probing). Use when a user provides a Figshare DOI or ndownloader URL and needs a reliable fetch path that always opens the page in browser, triggers the real download, then copies the downloaded file into a target path.
  • 100byted-tos-file-process
    Compresses and uncompresses file objects stored in Volcengine TOS through TOS data-process async jobs. Use this skill when the user needs to zip files, unzip archives, create tar or zstd archives, extract compressed files, pack multiple TOS objects into a single archive, bundle…
  • 95bio-ncbi-datasets-cli
    Download genome assemblies, gene records, and ortholog data from NCBI using the modern Datasets v2 CLI (replaces assembly_summary.txt scraping and many EFetch workflows). Use when bulk-pulling genome assemblies, gene metadata across species, ortholog sets, or BLAST databases;…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.