pygeofetch
Search, check, download and process satellite data from many providers, with one Python API and one CLI.
Statement of need · Install · Quick start · Case study · Documentation
Statement of need
Earth observation data are spread across many archives. Copernicus, USGS, NASA, ASF, OpenTopography and the commercial providers each have their own login, query interface and file format. Before any analysis, a researcher has to learn each of them, and the most expensive mistakes are found only after downloading: a Sentinel-1 stack mixing tracks or missing part of the area, a date with several overlapping slices, an optical scene too cloudy to use. For radar time series these mistakes cost hundreds of gigabytes and days of processing.
Existing tools solve parts of this. Clients such as EODAG, pystac-client and asf_search unify search and download; processors such as SNAP, ISCE2, MintPy and ASF HyP3 process data once suitable inputs are in hand. Getting from an area of interest to a consistent, complete set of inputs, and then to a first result, is still left to the user's own scripts.
pygeofetch covers that path in one pip-installable Python package:
- One search across providers, returning STAC-style results with footprint geometry where the provider supplies it.
- Checks before download: AOI coverage, one track and one product per date for Sentinel-1 stacks, temporal network connectivity, burst compatibility and cloud cover. Each check reports what it removed and why.
- Reliable transfer: parallel, resumable and checksum-verified downloads, with optional clean-up of inputs once they have been processed.
- Native processing in Python: optical preprocessing and spectral indices, and a Sentinel-1 InSAR chain (orbits, DEM, coregistration with ESD, interferograms, unwrapping with SNAPHU, SBAS time series) that needs no SNAP or ISCE installation.
It is meant for researchers, students and small teams who need analysis-ready stacks from several archives without maintaining a separate script for each provider.
Installation
pip install pygeofetch # core: search and download
pip install "pygeofetch[geo]" # + rasterio, geopandas, shapely
pip install "pygeofetch[insar]" # + InSAR processing and SBAS time series
pip install "pygeofetch[insar-full]" # + extra InSAR tools (Linux)
pip install "pygeofetch[all]" # everything
Requires Python 3.10 or later. Run pygeofetch doctor to check your installation and provider connections.
Quick start
from pygeofetch import PyGeoFetch
from pygeofetch.models.search_query import SearchQuery, BoundingBox
from pygeofetch.models.download_task import DownloadOptions
client = PyGeoFetch()
client.add_credentials("copernicus", username="you@example.com", password="...") # stored once, on your machine
results = client.search(
SearchQuery(bbox=BoundingBox.from_string("-74.1,40.6,-73.7,40.9"),
start_date="2024-01-01", cloud_cover_max=20),
providers=["copernicus", "planetary_computer", "aws_earth"],
)
downloads = client.download(results[:5], destination="./data/",
options=DownloadOptions(parallel=4, bands=["B02", "B03", "B04"]))
ndvi = client.indices.ndvi(red="B04.tif", nir="B08.tif")
A consistent Sentinel-1 stack for InSAR, in one call:
from pygeofetch.insar import search_and_select_consistent_stack
aoi = BoundingBox(min_lon=18.40, min_lat=50.05, max_lon=18.80, max_lat=50.25)
scenes, report = search_and_select_consistent_stack(client, aoi, start_date="2017-04-01", end_date="2017-12-31")
print(report) # chosen track, dates kept, and what was dropped and why
Everything is also available from the CLI (pygeofetch search run ..., pygeofetch download run ...) and as YAML pipelines.
Case study: Portuguese Bend landslide, Palos Verdes
Notebook, figures and results: github.com/appiahkubis14/palos-verdes-landslide-cs
The Portuguese Bend landslide complex in Rancho Palos Verdes, California, moved more than a metre a year in 2026. One notebook follows it from search to a check against GPS, using pygeofetch alone.
One interferogram per geometry from the same weeks. Sentinel-1 formed by pygeofetch from SLCs; NISAR GUNW products found and fetched at ASF.
What pygeofetch did:
- Search. It found 63 NISAR L2 GUNW products at ASF in 0.9 s and 83 Sentinel-1 SLC products at the Copernicus Data Space in 2.4 s, matched them with the 31 scenes already on disk, and downloaded none of them again.
- Inputs. It fetched precise orbits for all 31 dates and the Copernicus 30 m DEM.
- Interferograms. It formed 34 ascending and 26 descending Sentinel-1 interferograms natively and put all four geometries on one map grid.
- Time series. The slide moves faster than a 12-day C-band pair can follow (about 0.4 m/yr in the line of sight), but within NISAR's L-band limit (about 1.8 m/yr), so displacement was built from NISAR's unwrapped phase with pygeofetch's SBAS solver.
Result. A moving area of 2.44 km² was found from the data, with typical line-of-sight rates of −0.46 m/yr (ascending) and −0.27 m/yr (descending). Against the city's monthly GPS surveys, projected into each line of sight:
| GPS points | correlation r | RMS difference | slope NISAR / GPS | |
|---|---|---|---|---|
| NISAR ascending | 101 | 0.92 | 0.12 m/yr | 1.00 |
| NISAR descending | 101 | 0.79 | 0.17 m/yr | 1.12 |
Rates are along each radar's line of sight, relative to a stable ridge. The notebook lists its limits: NISAR products before 21 October 2026 are provisional, and the GPS predictions use horizontal motion where the workbook gives no vertical.
Providers
22 providers. Open access without login includes planetary_computer, aws_earth, element84, noaa_big_data, jaxa_earth, and geoserver_generic for any OGC WMS/WFS/WCS endpoint. With an account: USGS, Copernicus Data Space, NASA Earthdata (and Earthdata Cloud), Alaska Satellite Facility, OpenTopography, Planet, Sentinel Hub, Maxar, Airbus OneAtlas and Earth Explorer.
pygeofetch providers list shows the current table and pygeofetch providers info PROVIDER the details of one, including whether it returns real footprint geometry or only a bounding box.
Credentials are stored in a Fernet-encrypted local file by default, or in the system keyring (Keychain, Credential Manager, Secret Service) if you choose.
Processing
| Area | Functions |
|---|---|
Preprocessing (client.preprocess) |
atmos (DOS1/DOS2, Sen2Cor, FLAASH, 6S, iCOR) · cloud_mask · cloud_fill · topo_correct · clip · reproject · resample · pansharpen · tile · mosaic · composite |
Spectral indices (client.indices) |
ndvi · evi · savi · ndwi · mndwi · ndbi · ndsi · ndmi · nbr / dnbr · tct · pca · texture (GLCM) · lst · albedo · band_math |
Post-processing (client.post) |
vectorize · smooth · regularize · zonal_stats · buffer · centroids · compress · cog |
SAR (client.sar) |
despeckle (Lee, Enhanced Lee, Frost, Gamma MAP) · calibrate (σ0/γ0/β0) · flood_map · coherence |
InSAR (pygeofetch.insar) |
search_and_select_consistent_stack · SLCExtractor · InterferogramGenerator · AtmosphericCorrector · IonosphericCorrector · PhaseUnwrapper (SNAPHU) · SBASTimeSeries · InSARProject |
Signatures and options: documentation and pygeofetch/insar/README.md.
YAML pipelines
name: weekly-sentinel2-ndvi
schedule: "0 6 * * 1"
steps:
- search: {providers: [copernicus, aws_earth], date_range: last_7_days, cloud_cover: "0-10"}
- filter: {expression: "data.cloud_cover < 5"}
- download: {parallel: 4, output: ./raw/, bands: [B04, B08]}
- ndvi: {red: B04.tif, nir: B08.tif}
- vectorize: {threshold: 0.3, format: geojson}
- cog: {compress: deflate}
pygeofetch proc-pipeline run weekly-sentinel2.yaml --input scene.tif
pygeofetch pipeline schedule weekly-sentinel2.yaml --name ndvi-weekly
Built-in templates: ndvi · change_detection · flood_map · urban_mapping · sar_analysis · land_cover.
CLI
| Group | Example | Purpose |
|---|---|---|
auth |
pygeofetch auth add copernicus --username U --password P |
Manage credentials |
providers |
pygeofetch providers list --capabilities sar |
Discover and inspect providers |
search |
pygeofetch search run --bbox "..." --providers aws_earth,copernicus |
Search across providers |
download |
pygeofetch download run --from-search results.geojson --parallel 4 |
Parallel, resumable downloads |
preprocess |
pygeofetch preprocess clip scene.tif --bbox "..." |
Correction, clipping, reprojection |
index |
pygeofetch index ndvi --red B04.tif --nir B08.tif |
Spectral indices |
post |
pygeofetch post cog scene.tif --compress deflate |
Vectorizing, zonal statistics, COG |
sar |
pygeofetch sar coherence slc1.tif slc2.tif |
Despeckling, calibration, coherence, flood maps |
proc-pipeline / pipeline |
pygeofetch pipeline schedule weekly.yaml |
Run and schedule YAML pipelines |
cache / config |
pygeofetch cache prune --max-size 1GB |
Cache and configuration |
pygeofetch --help, or --help on any command, gives the full option list.
Citation
@software{pygeofetch_2026,
author = {Appiah Kubi, Samuel},
title = {pygeofetch: A Unified Python Framework for Multi-Provider Satellite Data Acquisition, Pre-download Quality Control, and Geospatial Processing},
year = {2026},
publisher = {Zenodo},
version = {2.7.3.5},
doi = {10.5281/zenodo.22087230},
url = {https://doi.org/10.5281/zenodo.22087230}
}
Documentation
pygeofetch.readthedocs.io: CLI reference, provider login guides, pipeline configuration, processing catalogue and InSAR methods.
Contributing
Contributions are welcome; see CONTRIBUTING.md. Good first issues: real footprint geometry for providers that return only a bounding box, completing stub providers, and new post-processing actions.
git clone git@github.com:EOCoreINT/pygeofetch.git && cd pygeofetch
pip install -e ".[test]" && pytest tests/ -v
Support
pygeofetch is developed and maintained by one person. If it is useful in your research or organisation, sponsoring it on GitHub funds the time spent keeping provider integrations working as their APIs change.
License
MIT, see LICENSE. © 2026 Samuel Appiah Kubi.
Metadata
Release files for pygeofetch 2.7.3.5
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 |
|---|---|---|---|---|
| pygeofetch-2.7.3.5.tar.gz | 995.9 kB | Without provenance | Details for pygeofetch-2.7.3.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pygeofetch-2.7.3.5-py3-none-any.whl | Python 3 | none | any | Details for pygeofetch-2.7.3.5-py3-none-any.whl |
Total release size: 1.9 MB
Release files / pygeofetch-2.7.3.5.tar.gz
| Download URL | pygeofetch-2.7.3.5.tar.gz |
|---|---|
| Size | 995.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e96e838567e39fbcaa4130b8e5b724ee1924ae64f5f2584d01ca036c194a319
|
|
BLAKE2b-256 checksum How to use checksums |
c6d06229f24c5cea9f4a2b7149aa49a5478ecd0d071802489afe22f51fd66349
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / pygeofetch-2.7.3.5-py3-none-any.whl
| Download URL | pygeofetch-2.7.3.5-py3-none-any.whl |
|---|---|
| Size | 911.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1fd3bcbca588f1e760a78eb2eb1a0ba87c509873c7710d995b95cecbef7b7975
|
|
BLAKE2b-256 checksum How to use checksums |
563e2d48592f02f7b29bdc7d362b7f7821d8b1da699f09a957859adfdcc59d34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for pygeofetch 2.7.3.5
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.