Skip to main content

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 .quarantine sidecar (JSON kind: 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

For development: uv sync.

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.

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.

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.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 eumdac-store 0.5.0
File Size Uploaded Provenance Actions
eumdac_store-0.5.0.tar.gz 24.1 kB With provenance Details for eumdac_store-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for eumdac-store 0.5.0
File Interpreter ABI Platform Actions
eumdac_store-0.5.0-py3-none-any.whl Python 3 none any Details for eumdac_store-0.5.0-py3-none-any.whl

Total release size: 44.0 kB

Release files / eumdac_store-0.5.0.tar.gz

Download URL eumdac_store-0.5.0.tar.gz
Size 24.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ada009fc19071e183168f98b0a434bad9de056da9ea2fc5810c6b174e2cfa7e5
BLAKE2b-256 checksum
How to use checksums
01b299d88b1a214bb241b3c01289a93970af442c5d8dc745e195da35e71e6a0a
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 30, 2026.

Transparency log

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

Download URL eumdac_store-0.5.0-py3-none-any.whl
Size 19.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8c6a236e0344daf6ef4f6d3b1b79d2642b067850b0a3f9f27b4d2730587b6d4f
BLAKE2b-256 checksum
How to use checksums
a456ab60ff06cf3828b9de264d8e5b8fb261458749df31a06cd9a3c6cec75887
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 30, 2026.

Transparency log

Security for eumdac-store 0.5.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.

Select from 2 files

Attestation for eumdac_store-0.5.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 30, 2026.

Transparency log

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.

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