Przejdź do treści
Biblioteka skilli
Nauka i badania · Automatyzacja

pooch

/pooch

Pobiera i buforuje zbiory danych geonaukowych z adresów URL lub DOI, sprawdza sumy kontrolne i rozpakowuje archiwa.

Licencja
MIT
Ostatnia zmiana repozytorium
15.09.2026

Ocena i bezpieczeństwo

98/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena13 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
3
Skrypty
1
Komentarze HTML
0
Adresy URL w SKILL.md
7
Przestarzałość

Brak sygnałów. Repozytorium zmienione 15.09.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: scripts/create_registry.py

Co robi i kiedy

Pobiera i buforuje zbiory danych geonaukowych z adresów URL lub DOI, sprawdza sumy kontrolne i rozpakowuje archiwa.

Oryginalny opis (EN)

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.

Jak działa

  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
Sekcje z nagłówków SKILL.md, w oryginale · 149 linii, 501 słów
Podgląd SKILL.md
---
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
Pliki w paczce (3)
  • SKILL.md 5 KB
  • references/registry.md 5 KB
  • scripts/create_registry.py 4 KB

Wersje

W bazie nie ma innych skilli o nazwie pooch.

Migawka bazy z 28.10.2026 · wersja paczki 7dca3eab542b (skrót SHA-256 całej paczki)

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 95ensaio
    Pobiera wersjonowane zbiory danych geofizycznych Fatiando i zachowuje ich skróty, cytowania oraz konwencje danych.
  • 90figshare-data-download
    Pobiera pliki z Figshare przez przeglądarkę: otwiera stronę, uruchamia właściwe pobieranie i kopiuje plik do docelowej ścieżki, gdy podano DOI lub URL ndownloader.
  • 100byted-tos-file-process
    Kompresuje i rozpakowuje obiekty plików w Volcengine TOS przez asynchroniczne zadania: zip, unzip, archiwa tar i zstd, pakowanie wielu obiektów w jedno archiwum.
  • 95bio-batch-downloads
    Pobiera duże zbiory danych z NCBI przez EPost, serwer historii, wsady, limity zapytań i ponawianie, z weryfikacją sum kontrolnych.
  • 95bio-ncbi-datasets-cli
    Pobiera asemblacje genomów, rekordy genów i dane ortologów z NCBI przez nowoczesne Datasets v2 CLI, z automatyczną weryfikacją sum kontrolnych i pobieraniem równoległym po akcesjach.
  • 100rseng-data-management
    Opisuje zarządzanie danymi badawczymi wokół oprogramowania: organizację i dokumentację zbiorów, wersjonowanie poza git (DVC, DataLad), standardy FAIR, depozyt z DOI w Zenodo i dane wrażliwe.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.