Skip to main content

Fetchez logo

Fetchez

Fetch. Cache. Deliver.

MIT License Python 3.12+ PyPI version Conda version Join project chat DOI


Fetchez is an open-source, extensible Python framework for discovering, retrieving, caching, and processing geospatial data. Connect to public data providers, work with local files, or configure sources Fetchez has never seen before.

Use the same building blocks from the command line, Python, or YAML. Combine data sources with processing hooks, save workflows as recipes, and share reusable configurations with colleagues. Fetchez handles the data plumbing so you can focus on what to do with the data.

Originally developed for the CUDEM project, Fetchez now serves as a general-purpose geospatial ETL and workflow foundation for projects including Globato and Transformez.

Table of Contents


Install

Basic installation:

pip install fetchez

With optional provider and processing dependencies:

pip install 'fetchez[full]'

Some workflows require external command-line tools such as GDAL, which must be installed separately.

Quick Start

Here's a complete example: discover elevation data around San Diego, download it, compress the rasters, and save the workflow for later reuse.

Step 1: Discover data

fetchez build \
  -R 'loc:san diego, ca' \
  list-only stac \
  --url https://earth-search.aws.element84.com/v1 \
  --collections cop-dem-glo-30 \
  --assets data \
  --limit 100

This queries the Earth Search STAC catalog for Copernicus DEM assets. The list-only flag lets you inspect matching entries without downloading them. No Copernicus-specific Python module is needed—the generic stac handler works with any STAC catalog.

Step 2: Fetch the data

Remove list-only to download the selected assets:

fetchez build \
  -R 'loc:san diego, ca' \
  stac \
  --url https://earth-search.aws.element84.com/v1 \
  --collections cop-dem-glo-30 \
  --assets data \
  --limit 100

Fetchez handles discovery, acquisition, caching, and entry processing in a unified workflow.

Step 3: Process with hooks

Fetching is only the beginning. Hooks let you inspect, filter, transform, or process entries as they move through the pipeline. For example, this built-in exec hook runs GDAL on each downloaded raster:

hook: exec
args:
  cmd:
    - gdal_translate
    - -of
    - GTiff
    - -co
    - COMPRESS=LZW
    - "{file}"
    - "{output}"
  output:
    suffix: _compressed
    extension: .tif
    update_entry: true

The {file} variable refers to the acquired input; {output} is the staged destination for the new artifact. After a successful command, Fetchez publishes the output and passes it to subsequent hooks.

Note: GDAL must be installed separately for this example.

Step 4: Save and replay the workflow

Export your configured pipeline as a YAML recipe:

fetchez build \
  -R 'loc:san diego, ca' \
  --export san_diego_dem.yaml \
  stac \
  --url https://earth-search.aws.element84.com/v1 \
  --collections cop-dem-glo-30 \
  --assets data \
  --limit 100 \
  exec \
  --cmd "gdal_translate {file} {output}" \
  --suffix "_trans"

Then run the recipe later:

fetchez run san_diego_dem.yaml

The exported recipe retains list-only for safe exploration. Remove that discovery-only step when you want the recipe to actually fetch data.

Core Concepts

Fetchez composes workflows from several component types. Understanding these helps you build effective configurations:

Component Purpose
Sources Discover and retrieve data from catalogs, APIs, filesystems, or web indices
Hooks Process entries as they pass through the pipeline (transform, filter, audit, etc.)
Recipes YAML files that compose sources, hooks, and options into repeatable workflows
Bundles Pre-packaged collections of sources, hooks, and configurations for sharing
Readers Connect acquired data with downstream processing applications

In fetchez build, components are composed left to right: hooks before the first source apply globally, while hooks after a source apply only to that source.

Explore registered components:

fetchez modules list          # Available data sources
fetchez modules bundles list  # Pre-configured bundles
fetchez hooks list            # Available hooks
fetchez hooks presets list    # Hook presets

Bring Your Own Data Source

Fetchez prioritizes configuration over code. You can make new datasets accessible through YAML configuration rather than writing Python modules for every provider.

Generic Module Best For
local_fs Local files, file lists, and directories
http_index HTTP directory listings and web pages with downloadable assets, with optional FRED spatial indexing
rest_api REST/JSON APIs, search responses, pagination, and discovered asset URLs
stac Spatial and temporal asset catalogs (imagery, elevation, lidar, cloud datasets)
thredds Scientific THREDDS catalogs and services (HTTPServer, NCSS, WCS, OPeNDAP)

For example, accessing files from a ScienceBase record can be as simple as configuring rest_api:

module: rest_api
args:
  url: https://www.sciencebase.gov/catalog/item/5a710077e4b0a9a2e9dafd52
  mode: discover
  parameters:
    format: json
  results_path: files
  url_field: url
  filename_field: name

These are generic interfaces—not every service follows the same conventions. Some sources require authentication or provider-specific settings; OPeNDAP endpoints need compatible readers rather than conventional downloads.

Choosing the right approach:

  • Use a built-in provider module when it already captures provider-specific behavior
  • Use a generic module to configure a new service via YAML
  • Write a custom module or hook when the source needs specialized discovery or processing logic

Python API

Fetchez works equally well from Python, alongside the CLI and declarative workflows. For example, this convenience API retrieves NOAA Electronic Nautical Chart files and applies hooks:

import fetchez

files = fetchez.get(
    "charts",
    region=[-120, -118, 33, 34],
    hooks=["unzip", "filename_filter:match=.000", "audit"],
)

For custom applications, the module, reader, hook, and recipe interfaces provide more direct control. Python and YAML workflows build on the same extensible component system.

Extensibility

Fetchez provides registries and execution lifecycles for:

  • Modules and bundles — Discover data sources and curate reusable collections
  • Hooks and presets — Inspect, filter, transform, and process entries, files, and streams
  • Readers and streams — Connect acquired data with downstream processing
  • Recipes, modifiers, and schemas — Compose, customize, and validate repeatable workflows
  • Plugins and extensions — Add domain-specific behavior without changing Fetchez core

Contributions don't require Python plugins. A working YAML example, reusable source configuration, documentation for an unfamiliar API, or curated bundle can be a valuable addition. The goal is to make useful workflows easy to discover, reproduce, adapt, and share.

Built on Fetchez

  • Globato builds reproducible coastal and topobathymetric DEMs using Fetchez discovery and workflows, elevation-specific readers and hooks, MultiStack accumulation, and multi-resolution interpolation
  • Transformez integrates Fetchez data acquisition into spatial and vertical-reference transformation workflows
  • IVERT provides an independent elevation-validation workflow using ICESat-2 data

Fetchez grew from the CUDEM fetching engine, but its modules, hooks, recipes, and interfaces are designed for broader geospatial engineering applications.

Documentation & Community

The Fetchez documentation expands on these examples, including generic data sources, recipes and bundles, hooks, Python integration, metadata, readers, and custom extensions.

Questions, ideas, and new source configurations are welcome in the community chat or through GitHub issues and pull requests.

License

Fetchez is licensed under the MIT License.

Copyright (c) 2010–2026 Regents of the University of Colorado.

Metadata

Release files for fetchez 0.12.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 fetchez 0.12.3
File Size Uploaded Provenance Actions
fetchez-0.12.3.tar.gz 1.7 MB With provenance Details for fetchez-0.12.3.tar.gz

Built distribution (wheel)

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

Total release size: 3.4 MB

Release files / fetchez-0.12.3.tar.gz

Download URL fetchez-0.12.3.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
b22da3e46add8f8538e62336f91472c1c2dbbaec28228cf3f5e37827b088c222
BLAKE2b-256 checksum
How to use checksums
f8c571888fd8caa7be389f275975894f01d3bcc01505a016c0558e35e6ff4c30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 2, 2026.

Transparency log

Release files / fetchez-0.12.3-py3-none-any.whl

Download URL fetchez-0.12.3-py3-none-any.whl
Size 1.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
894022b63304c53c1c937b857be0c0abb686b4c22e9292e4e7be1d92396dac95
BLAKE2b-256 checksum
How to use checksums
3a9766cd3e3d1d3c45523bfeeab55ed53d2c7e134e9ac3edfbecfb8ae7325133
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 2, 2026.

Transparency log

Security for fetchez 0.12.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fetchez-0.12.3.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 2, 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.

Release history Release notifications | RSS feed

This release

0.12.3 This release

2 release files Full provenance

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