eumdac-store
Robust EUMDAC downloader — Python API + CLI, to a directory or a bucket.
What it adds on top of plain eumdac download:
- Rate-limit awareness — parallel downloads clamped to EUMDAC's 10-connection ceiling.
- Retries with backoff — one budget shared across network errors and integrity failures.
- Integrity validation — each download checked against EUMDAC's size + ZIP magic before publishing. MD5 is skipped (EUMDAC publishes wrong MD5 metadata).
- Atomic publish — partials are unlinked on failure, so a reader never sees half-files.
- Persistent-corruption quarantine — a product that exhausts the retry budget gets a
.quarantinesidecar (JSONkind:missing/size/zip) and is skipped until cooloff. - Skip what we already have — a ducats catalog synced from the store (a directory or a bucket) decides presence, re-synced after each run.
Install
pip install eumdac-store # a local directory as the store
pip install "eumdac-store[s3]" # also object storage (s3://…)
For development: uv sync --extra s3.
CLI
# Download the last day, skipping what the catalog already has.
# Product wiring is required and comes from a config file — ASCAT SZF values ship in examples/ascat_szf.yaml:
eumdac-store download --config examples/ascat_szf.yaml --days 1 \
--download-root-dir /data/eumdac
# Explicit window:
eumdac-store download --config examples/ascat_szf.yaml \
--start 2026-01-01T00:00 --end 2026-01-02T00:00 ...
# Either bound is optional: --start alone fetches everything since then (up to
# now); --end alone fetches everything up to it (open lower bound).
# E.g. backfill the whole collection up to a date:
eumdac-store download --config examples/ascat_szf.yaml --end 2026-01-01T00:00 ...
# List without downloading:
eumdac-store list --config examples/ascat_szf.yaml --days 1 ...
# Re-sync the catalog from the store (no EUMDAC calls):
eumdac-store sync --config examples/ascat_szf.yaml ...
# Sync status + quarantine sidecar count:
eumdac-store status --config examples/ascat_szf.yaml ...
Credentials: EUMDAC_KEY / EUMDAC_SECRET in the environment or .env, or EUMETSAT's own credentials.json ({"consumer_key": …, "consumer_secret": …}) placed at $XDG_CONFIG_HOME/eumdac-store/credentials.json (default ~/.config/eumdac-store/credentials.json). Env vars win over the file. Config also via $EUMDAC_STORE_CONFIG or EUMDAC_STORE_* env vars; per-flag options win.
Object storage (S3)
download_root_dir may be a URL instead of a directory; the local filesystem stays the default.
uv sync --extra s3 # universal-pathlib + s3fs
eumdac-store download --config examples/ascat_szf.yaml --days 1 \
--download-root-dir s3://tuw-ascat-l1b/eumdac
Credentials and endpoint come from the usual AWS sources (AWS_PROFILE, AWS_SHARED_CREDENTIALS_FILE, AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY, AWS_ENDPOINT_URL) or from storage_options (YAML, or EUMDAC_STORE_STORAGE_OPTIONS as JSON), passed to fsspec as is, e.g. {"profile": "tuw-ascat-l1b", "endpoint_url": "https://objects.eodc.eu"}.
What differs from a local root:
- Publish — the zip is downloaded and validated on local disk (a temp dir), then uploaded in one PUT; an object is only visible once its upload completes, so readers never see a half file.
- Catalog — local, as for every root (see Configuration); ducats's
glob()lists the bucket through the same fsspec filesystem (registered with DuckDB), so presence still comes from what is really stored. - Quarantine — sidecars are small objects next to the zips; their age is the object's LastModified (or the sidecar's own
quarantined_at). - Retention — set a lifecycle rule on the bucket; eumdac-store never deletes.
Gaps
eumdac-store gaps --config examples/ascat_szf.yaml --days 2 # exit 4 if any
Lists the store and reports breaks in each group's time chain (groups: the pattern's named groups other than start/end, e.g. sat; or gap_group_cols). Consecutive files chain when the next starts gap_min_seconds..gap_max_seconds after the last one ends (defaults 0..1 s, as SZF). --start/--end keep the gaps that begin in that window.
Airflow
The fetch DAG that keeps a rolling archive filled (e.g. s3://tuw-ascat-l1b/szf/) lives in its own repository, eumdac-fetch. It installs this package from PyPI at a pinned version, so no image is needed.
Python API
from eumdac_store import EumdacStore, StoreConfig
store = EumdacStore(StoreConfig.from_yaml("examples/ascat_szf.yaml",
download_root_dir="/data/eumdac",
))
result = store.download(days=1) # or start=, end=, specific_dates=
print(result) # downloaded=… skipped_present=… skipped_quarantined=… failed=…
Product fields are required (no defaults); pass them inline to StoreConfig(...) to skip the YAML.
Configuration
| Field | Required | Default | Meaning |
|---|---|---|---|
collection_id |
yes | — | EUMDAC collection to search |
product_name |
yes | — | ducats catalog table name (must be a valid identifier) |
filename_glob |
yes | — | Which files in <product_name>/ the catalog globs |
filename_pattern |
yes | — | Regex for ducats's RegexExtractor; (?P<start>...) is required, (?P<end>...) optional (absent → end_ts NULL), other named groups become categorical columns |
download_root_dir |
yes | — | EUMDAC data root: <product_name>/ per product lives here. A directory, or a URL such as s3://bucket/prefix (see Object storage) |
storage_options |
no | {} |
fsspec options for a URL root |
catalog_file |
no | derived | DuckDB catalog path (see below) |
max_workers |
no | 10 | Parallel downloads (hard-clamped to 10) |
max_retries |
no | 3 | Retry budget per file |
quarantine_cooloff_hours |
no | 2.0 | How long a quarantine sidecar suppresses refetch |
product_dir is <download_root_dir>/<product_name>/. The catalog is a local cache of that listing, rebuilt from scratch on every sync, so it is kept out of the data: catalog_path is catalog_file if set, else $XDG_CACHE_HOME/eumdac-store/<root>/catalog.duckdb (<root> is the absolute directory without its leading /, or bucket/prefix for a URL). Losing it costs one sync. A catalog left at <download_root_dir>/catalog.duckdb by earlier versions is deleted after the first successful sync, so a copy of the root never carries a stale one.
Products under one download_root_dir share one catalog (one DuckDB file, one table per product_name).
Copy examples/ascat_szf.yaml for another product. A missing required field is a hard validation error.
Tests
uv run pytest # no network — a fake EUMDAC DataStore backs every test
Metadata
Release files for eumdac-store 0.4.0
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 |
|---|---|---|---|---|
| eumdac_store-0.4.0.tar.gz | 24.5 kB | With provenance | Details for eumdac_store-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| eumdac_store-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for eumdac_store-0.4.0-py3-none-any.whl |
Total release size: 44.8 kB
Release files / eumdac_store-0.4.0.tar.gz
| Download URL | eumdac_store-0.4.0.tar.gz |
|---|---|
| Size | 24.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8baa5df04b131948865cde96eaa7703348df5e4c01696d4dcb4eed80f7b906f3
|
|
BLAKE2b-256 checksum How to use checksums |
8935d30ae1e6959d840ef2ca97d368f47671200dabcfb5d084006d19c6d701b5
|
| 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 Nov 27, 2026.
Transparency logRelease files / eumdac_store-0.4.0-py3-none-any.whl
| Download URL | eumdac_store-0.4.0-py3-none-any.whl |
|---|---|
| Size | 20.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
514cdd53620941e36d42ffab0f708dd0d6945f662251d901ea9a76502e6ace58
|
|
BLAKE2b-256 checksum How to use checksums |
705a68a4dff7dcb03cf294d5503e56cd52204a7fe152e5b2bb63e1a9ce71d075
|
| 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 Nov 27, 2026.
Transparency logSecurity for eumdac-store 0.4.0
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 eumdac_store-0.4.0.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 Nov 27, 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.