PyGeoFetch 0.1.0__tar.gz → 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. {pygeofetch-0.1.0 → pygeofetch-0.1.2}/LICENSE +21 -21
  2. pygeofetch-0.1.2/PKG-INFO +302 -0
  3. pygeofetch-0.1.2/README.md +219 -0
  4. pygeofetch-0.1.2/pygeofetch/__init__.py +39 -0
  5. pygeofetch-0.1.2/pygeofetch/cli/__init__.py +1 -0
  6. pygeofetch-0.1.2/pygeofetch/cli/auth_commands.py +257 -0
  7. pygeofetch-0.1.2/pygeofetch/cli/config_commands.py +143 -0
  8. pygeofetch-0.1.2/pygeofetch/cli/download_commands.py +272 -0
  9. pygeofetch-0.1.2/pygeofetch/cli/main.py +770 -0
  10. pygeofetch-0.1.2/pygeofetch/cli/search_commands.py +249 -0
  11. pygeofetch-0.1.2/pygeofetch/config/__init__.py +11 -0
  12. pygeofetch-0.1.2/pygeofetch/config/defaults.yaml +86 -0
  13. pygeofetch-0.1.2/pygeofetch/config/settings.py +235 -0
  14. pygeofetch-0.1.2/pygeofetch/core/__init__.py +18 -0
  15. pygeofetch-0.1.2/pygeofetch/core/authenticator.py +428 -0
  16. pygeofetch-0.1.2/pygeofetch/core/cache_manager.py +288 -0
  17. pygeofetch-0.1.2/pygeofetch/core/downloader.py +354 -0
  18. pygeofetch-0.1.2/pygeofetch/core/engine.py +312 -0
  19. pygeofetch-0.1.2/pygeofetch/core/scheduler.py +473 -0
  20. pygeofetch-0.1.2/pygeofetch/core/searcher.py +341 -0
  21. pygeofetch-0.1.2/pygeofetch/models/__init__.py +44 -0
  22. pygeofetch-0.1.2/pygeofetch/models/download_task.py +282 -0
  23. pygeofetch-0.1.2/pygeofetch/models/satellite_data.py +395 -0
  24. pygeofetch-0.1.2/pygeofetch/models/search_query.py +329 -0
  25. pygeofetch-0.1.2/pygeofetch/models/user_auth.py +123 -0
  26. pygeofetch-0.1.2/pygeofetch/providers/__init__.py +192 -0
  27. pygeofetch-0.1.2/pygeofetch/providers/airbus_oneatlas.py +150 -0
  28. pygeofetch-0.1.2/pygeofetch/providers/alaska_satellite_facility.py +150 -0
  29. pygeofetch-0.1.2/pygeofetch/providers/aws_earth.py +267 -0
  30. pygeofetch-0.1.2/pygeofetch/providers/base.py +306 -0
  31. pygeofetch-0.1.2/pygeofetch/providers/copernicus.py +487 -0
  32. pygeofetch-0.1.2/pygeofetch/providers/digitalglobe.py +150 -0
  33. pygeofetch-0.1.2/pygeofetch/providers/earth_explorer_additional.py +150 -0
  34. pygeofetch-0.1.2/pygeofetch/providers/element84.py +230 -0
  35. pygeofetch-0.1.2/pygeofetch/providers/esa_scihub.py +150 -0
  36. pygeofetch-0.1.2/pygeofetch/providers/geoserver_generic.py +150 -0
  37. pygeofetch-0.1.2/pygeofetch/providers/google_earth_engine.py +150 -0
  38. pygeofetch-0.1.2/pygeofetch/providers/inpe_cbers.py +150 -0
  39. pygeofetch-0.1.2/pygeofetch/providers/isro_bhuvan.py +150 -0
  40. pygeofetch-0.1.2/pygeofetch/providers/jaxa_earth.py +150 -0
  41. pygeofetch-0.1.2/pygeofetch/providers/maxar_gbdx.py +150 -0
  42. pygeofetch-0.1.2/pygeofetch/providers/nasa_earthdata.py +190 -0
  43. pygeofetch-0.1.2/pygeofetch/providers/nasa_earthdata_cloud.py +345 -0
  44. pygeofetch-0.1.2/pygeofetch/providers/noaa_big_data.py +150 -0
  45. pygeofetch-0.1.2/pygeofetch/providers/opentopography.py +108 -0
  46. pygeofetch-0.1.2/pygeofetch/providers/planet.py +369 -0
  47. pygeofetch-0.1.2/pygeofetch/providers/planetary_computer.py +273 -0
  48. pygeofetch-0.1.2/pygeofetch/providers/sentinel_hub.py +173 -0
  49. pygeofetch-0.1.2/pygeofetch/providers/terrabotics.py +278 -0
  50. pygeofetch-0.1.2/pygeofetch/providers/usgs.py +469 -0
  51. pygeofetch-0.1.2/pygeofetch/utils/__init__.py +50 -0
  52. pygeofetch-0.1.2/pygeofetch/utils/file_utils.py +275 -0
  53. pygeofetch-0.1.2/pygeofetch/utils/geo_utils.py +240 -0
  54. pygeofetch-0.1.2/pygeofetch/utils/logging_setup.py +107 -0
  55. pygeofetch-0.1.2/pygeofetch/utils/retry_handler.py +225 -0
  56. pygeofetch-0.1.2/pygeofetch/utils/validators.py +155 -0
  57. pygeofetch-0.1.2/pygeofetch.egg-info/PKG-INFO +302 -0
  58. pygeofetch-0.1.2/pygeofetch.egg-info/SOURCES.txt +64 -0
  59. pygeofetch-0.1.2/pygeofetch.egg-info/entry_points.txt +2 -0
  60. {pygeofetch-0.1.0/PyGeoFetch.egg-info → pygeofetch-0.1.2/pygeofetch.egg-info}/not-zip-safe +1 -1
  61. {pygeofetch-0.1.0/PyGeoFetch.egg-info → pygeofetch-0.1.2/pygeofetch.egg-info}/requires.txt +1 -1
  62. pygeofetch-0.1.2/pygeofetch.egg-info/top_level.txt +1 -0
  63. {pygeofetch-0.1.0 → pygeofetch-0.1.2}/pyproject.toml +105 -105
  64. {pygeofetch-0.1.0 → pygeofetch-0.1.2}/setup.cfg +18 -18
  65. pygeofetch-0.1.0/PKG-INFO +0 -720
  66. pygeofetch-0.1.0/PyGeoFetch.egg-info/PKG-INFO +0 -720
  67. pygeofetch-0.1.0/PyGeoFetch.egg-info/SOURCES.txt +0 -11
  68. pygeofetch-0.1.0/PyGeoFetch.egg-info/entry_points.txt +0 -2
  69. pygeofetch-0.1.0/PyGeoFetch.egg-info/top_level.txt +0 -1
  70. pygeofetch-0.1.0/README.md +0 -637
  71. {pygeofetch-0.1.0/PyGeoFetch.egg-info → pygeofetch-0.1.2/pygeofetch.egg-info}/dependency_links.txt +0 -0
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 PyGeoFetch Contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2024 pygeofetch Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,302 @@
1
+ Metadata-Version: 2.4
2
+ Name: pygeofetch
3
+ Version: 0.1.2
4
+ Summary: Universal satellite data download pipeline with unified access to 20+ repositories
5
+ Author: pygeofetch Contributors
6
+ License: MIT License
7
+
8
+ Copyright (c) 2024 pygeofetch Contributors
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://github.com/pygeofetch/pygeofetch
29
+ Project-URL: Documentation, https://pygeofetch.readthedocs.io
30
+ Project-URL: Repository, https://github.com/pygeofetch/pygeofetch
31
+ Project-URL: Bug Tracker, https://github.com/pygeofetch/pygeofetch/issues
32
+ Keywords: satellite,remote-sensing,GIS,earth-observation,geospatial
33
+ Classifier: Development Status :: 4 - Beta
34
+ Classifier: Intended Audience :: Science/Research
35
+ Classifier: License :: OSI Approved :: MIT License
36
+ Classifier: Programming Language :: Python :: 3
37
+ Classifier: Programming Language :: Python :: 3.9
38
+ Classifier: Programming Language :: Python :: 3.10
39
+ Classifier: Programming Language :: Python :: 3.11
40
+ Classifier: Programming Language :: Python :: 3.12
41
+ Classifier: Topic :: Scientific/Engineering :: GIS
42
+ Requires-Python: >=3.9
43
+ Description-Content-Type: text/markdown
44
+ License-File: LICENSE
45
+ Requires-Dist: httpx>=0.27
46
+ Requires-Dist: httpx[http2]>=0.27
47
+ Requires-Dist: click>=8.1
48
+ Requires-Dist: pydantic>=2.5
49
+ Requires-Dist: pydantic-settings>=2.1
50
+ Requires-Dist: rich>=13.7
51
+ Requires-Dist: shapely>=2.0
52
+ Requires-Dist: pyproj>=3.6
53
+ Requires-Dist: pystac>=1.9
54
+ Requires-Dist: cryptography>=42.0
55
+ Requires-Dist: keyring>=24.3
56
+ Requires-Dist: aiofiles>=23.2
57
+ Requires-Dist: tenacity>=8.2
58
+ Requires-Dist: PyYAML>=6.0
59
+ Requires-Dist: python-dateutil>=2.9
60
+ Requires-Dist: tqdm>=4.66
61
+ Requires-Dist: anyio>=4.2
62
+ Requires-Dist: boto3>=1.34
63
+ Requires-Dist: requests>=2.31
64
+ Requires-Dist: click-completion>=0.5
65
+ Provides-Extra: geo
66
+ Requires-Dist: rasterio>=1.3; extra == "geo"
67
+ Requires-Dist: geopandas>=0.14; extra == "geo"
68
+ Requires-Dist: pyarrow>=15.0; extra == "geo"
69
+ Provides-Extra: dev
70
+ Requires-Dist: pytest>=8.0; extra == "dev"
71
+ Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
72
+ Requires-Dist: pytest-cov>=4.1; extra == "dev"
73
+ Requires-Dist: pytest-mock>=3.12; extra == "dev"
74
+ Requires-Dist: vcrpy>=6.0; extra == "dev"
75
+ Requires-Dist: httpx[mock]>=0.27; extra == "dev"
76
+ Requires-Dist: black>=24.0; extra == "dev"
77
+ Requires-Dist: ruff>=0.3; extra == "dev"
78
+ Requires-Dist: mypy>=1.8; extra == "dev"
79
+ Requires-Dist: bump2version>=1.0; extra == "dev"
80
+ Provides-Extra: all
81
+ Requires-Dist: pygeofetch[dev,geo]; extra == "all"
82
+ Dynamic: license-file
83
+
84
+ <div align="center">
85
+
86
+ <img src="https://appiahkubis14.github.io/portfolio/logo/samuel_logo_dark.svg" alt="PyGeoFetch Logo" width="200"/>
87
+
88
+ # PyGeoFetch
89
+
90
+ [![PyPI version](https://badge.fury.io/py/pygeofetch.svg)](https://pypi.org/project/pygeofetch/)
91
+ [![Python Versions](https://img.shields.io/pypi/pyversions/pygeofetch.svg)](https://pypi.org/project/pygeofetch/)
92
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
93
+ [![Tests](https://github.com/appiahkubis14/pygeofetch/actions/workflows/tests.yml/badge.svg)](https://github.com/appiahkubis14/pygeofetch/actions)
94
+ [![Coverage](https://codecov.io/gh/appiahkubis14/pygeofetch/branch/main/graph/badge.svg)](https://codecov.io/gh/appiahkubis14/pygeofetch)
95
+
96
+ **Universal satellite data pipeline — unified access to 22+ satellite repositories with one CLI or Python API.**
97
+
98
+ </div>
99
+
100
+ ---
101
+
102
+ ## 📖 Introduction
103
+
104
+ PyGeoFetch is a **production-ready satellite data acquisition framework** that provides unified, authenticated access to 22+ Earth observation repositories — including Sentinel, Landsat, Planet, Maxar, Airbus, Copernicus, USGS, NASA, JAXA, and more — through a single consistent CLI and Python API.
105
+
106
+ The package abstracts away the authentication complexity, API fragmentation, and format inconsistencies of individual satellite providers, giving researchers and engineers a single command or function call to search, filter, download, and post-process satellite imagery at scale.
107
+
108
+ PyGeoFetch provides five core capabilities:
109
+
110
+ 1. Authenticated access to 22+ providers, with secure credential storage via system keyring (macOS Keychain, Windows Credential Manager, Linux Secret Service).
111
+ 2. Unified search across all providers, returning standardized GeoJSON, STAC, GeoParquet, or CSV results sortable by cloud cover, date, score, or satellite.
112
+ 3. Resilient parallel downloads with checksum verification, resume support, exponential backoff, and atomic writes.
113
+ 4. A chainable post-processing system for reprojection, compression, NDVI/NDWI computation, resampling, and Cloud Optimized GeoTIFF conversion.
114
+ 5. YAML pipeline orchestration with cron scheduling, webhook notifications, and full pipeline history — enabling repeatable, automated geospatial data workflows.
115
+
116
+ ---
117
+
118
+ ## 📝 Statement of Need
119
+
120
+ Accessing satellite data at scale is surprisingly fragmented. Each provider — USGS, Copernicus, Planet, Maxar, NASA — exposes a different authentication scheme, a different query API, a different download protocol, and a different file format. Researchers and engineers working across multiple providers must maintain a patchwork of custom scripts, scattered credentials, and ad hoc download logic, making workflows difficult to reproduce and brittle to maintain.
121
+
122
+ Existing tools address parts of this problem: EODAG supports several providers but lacks pipeline orchestration and commercial coverage; `pystac-client` handles STAC-compliant endpoints only; `sentinelsat` is Sentinel-specific. No single tool covers the full breadth of providers needed for operational geospatial workflows.
123
+
124
+ PyGeoFetch addresses this gap by providing:
125
+
126
+ - A **single CLI** that works identically across all 22 providers.
127
+ - A **unified Python API** with standardized result and download models, removing provider-specific boilerplate.
128
+ - A **pipeline layer** for scheduling recurring data acquisitions without external orchestration tools.
129
+ - **Production-grade resilience** — circuit breakers, retries, resume, checksum verification, and atomic writes — that make satellite downloads reliable enough for automated pipelines.
130
+
131
+ ---
132
+
133
+ ## 🚀 Key Features
134
+
135
+ ### 🛰️ 22+ Satellite Providers
136
+ - Open-access providers with no login required: Microsoft Planetary Computer, AWS Earth, Element 84, NOAA Big Data, ESA SciHub mirrors, JAXA, ISRO Bhuvan, INPE CBERS, DigitalGlobe Open Data
137
+ - Credentialled providers: USGS, Copernicus CDSE, NASA Earthdata, Planet Labs, Sentinel Hub, Maxar GBDX, Airbus OneAtlas, Alaska Satellite Facility, Google Earth Engine, OpenTopography, TerraBotics
138
+ - Supports SAR, sub-metre, STAC, optical, DEM, and LiDAR collections across providers
139
+
140
+ ### 🔍 Unified Search
141
+ - Single query across multiple providers simultaneously with merged, deduplicated results
142
+ - Filter by bounding box, geometry file, date range, cloud cover, resolution, processing level, and CQL2 expressions
143
+ - Output to table, JSON, GeoJSON, STAC ItemCollection, GeoParquet, CSV, or scene IDs
144
+
145
+ ### 📥 Resilient Downloads
146
+ - Adaptive parallel downloads with configurable concurrency
147
+ - SHA256 checksum verification, resume support, and exponential-backoff retries
148
+ - Atomic writes — no partial files ever written to disk
149
+ - Bandwidth throttling and webhook notifications on completion or failure
150
+
151
+ ### ⚙️ Post-Processing Chains
152
+ Chain operations applied immediately after download:
153
+
154
+ `unzip` → `reproject:EPSG:4326` → `compress:lzw` → `ndvi` → `resample:10` → `cog`
155
+
156
+ Full list: unzip, reproject, compress, NDVI, NDWI, composite, atmospheric correction, clip, resample, Cloud Optimized GeoTIFF, merge, pan-sharpen.
157
+
158
+ ### 📋 YAML Pipeline Orchestration
159
+ - Define search → filter → download → export workflows in YAML
160
+ - Schedule with cron expressions, list history, retry failed runs
161
+ - Docker-ready for containerized pipeline deployments
162
+
163
+ ### 🔐 Security by Default
164
+ - Credentials stored in system keyring — never logged or written to disk in plaintext
165
+ - TLS 1.2+ enforced, SSL verification always on, no telemetry, no analytics
166
+
167
+ ---
168
+
169
+ ## 📦 Installation
170
+
171
+ ```bash
172
+ # Core
173
+ pip install pygeofetch
174
+
175
+ # + Raster/vector processing (rasterio, geopandas, rioxarray)
176
+ pip install "pygeofetch[geo]"
177
+
178
+ # + Everything
179
+ pip install "pygeofetch[all]"
180
+ ```
181
+
182
+ **Requirements:** Python 3.9+
183
+
184
+ ---
185
+
186
+ ## ⚡ Quick Start
187
+
188
+ ### CLI
189
+
190
+ ```bash
191
+ # Add credentials
192
+ pygeofetch auth add usgs --username USER --password PASS
193
+ pygeofetch auth add planet --api-key YOUR_KEY
194
+
195
+ # Search
196
+ pygeofetch search run \
197
+ --bbox "-74.1,40.6,-73.7,40.9" \
198
+ --start-date 2024-01-01 \
199
+ --cloud-cover 0-15 \
200
+ --providers planetary_computer \
201
+ --output results.geojson
202
+
203
+ # Download with post-processing
204
+ pygeofetch download run \
205
+ --from-search results.geojson \
206
+ --output ./data/ \
207
+ --parallel 4 \
208
+ --verify-checksum \
209
+ --post-process "unzip,reproject:EPSG:4326,compress:lzw,cog"
210
+ ```
211
+
212
+ ### Python API
213
+
214
+ ```python
215
+ from pathlib import Path
216
+ from pygeofetch import pygeofetch
217
+ from pygeofetch.models import SearchQuery, DownloadOptions
218
+
219
+ sb = pygeofetch()
220
+ sb.add_credentials("usgs", username="user", password="pass")
221
+ sb.add_credentials("planet", api_key="PL_KEY")
222
+
223
+ results = sb.search(
224
+ SearchQuery(
225
+ bbox=(-74.1, 40.6, -73.7, 40.9),
226
+ start_date="2024-01-01",
227
+ end_date="2024-06-01",
228
+ cloud_cover_max=20,
229
+ ),
230
+ providers=["usgs", "copernicus", "planetary_computer", "aws_earth"],
231
+ )
232
+
233
+ downloads = sb.download(
234
+ results[:5],
235
+ destination=Path("./data/"),
236
+ options=DownloadOptions(parallel=4, verify_checksum=True, resume=True),
237
+ )
238
+
239
+ for dr in downloads:
240
+ print(f"✓ {dr.data_id} ({dr.bytes_downloaded // 1024 // 1024:.1f} MB)" if dr.success else f"✗ {dr.data_id}: {dr.error}")
241
+ ```
242
+
243
+ ### YAML Pipeline
244
+
245
+ ```yaml
246
+ name: weekly-sentinel2-ndvi
247
+ schedule: "0 6 * * 1"
248
+ steps:
249
+ - search:
250
+ providers: [copernicus, aws_earth, planetary_computer]
251
+ date_range: last_7_days
252
+ cloud_cover: 0-10
253
+ bbox: "-74.1,40.6,-73.7,40.9"
254
+ - filter:
255
+ expression: "data.cloud_cover < 5"
256
+ - download:
257
+ parallel: 4
258
+ output: ./raw/
259
+ verify_checksum: true
260
+ post_process: "unzip,reproject:EPSG:4326,cog"
261
+ - export:
262
+ format: cloud_optimized_geotiff
263
+ destination: s3://my-bucket/ndvi/
264
+ ```
265
+
266
+ ```bash
267
+ pygeofetch pipeline run weekly-sentinel2.yaml
268
+ pygeofetch pipeline schedule weekly-sentinel2.yaml
269
+ ```
270
+
271
+ ---
272
+
273
+ ## 📋 Documentation
274
+
275
+ Comprehensive documentation is available at **https://pygeofetch.readthedocs.io**, including:
276
+
277
+ - Full CLI reference
278
+ - Provider authentication guides
279
+ - Pipeline configuration reference
280
+ - Post-processing action catalogue
281
+ - Contributing guide
282
+
283
+ ---
284
+
285
+ ## 🤝 Contributing
286
+
287
+ Contributions of all kinds are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for full guidelines.
288
+
289
+ Good first issues include implementing stub providers to full API integrations, improving test coverage, and adding new post-processing actions.
290
+
291
+ ```bash
292
+ git clone https://github.com/appiahkubis14/pygeofetch
293
+ cd pygeofetch
294
+ pip install -e ".[dev,all]"
295
+ pytest tests/ -v
296
+ ```
297
+
298
+ ---
299
+
300
+ ## 📄 License
301
+
302
+ PyGeoFetch is free and open source software, licensed under the [MIT License](LICENSE).
@@ -0,0 +1,219 @@
1
+ <div align="center">
2
+
3
+ <img src="https://appiahkubis14.github.io/portfolio/logo/samuel_logo_dark.svg" alt="PyGeoFetch Logo" width="200"/>
4
+
5
+ # PyGeoFetch
6
+
7
+ [![PyPI version](https://badge.fury.io/py/pygeofetch.svg)](https://pypi.org/project/pygeofetch/)
8
+ [![Python Versions](https://img.shields.io/pypi/pyversions/pygeofetch.svg)](https://pypi.org/project/pygeofetch/)
9
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10
+ [![Tests](https://github.com/appiahkubis14/pygeofetch/actions/workflows/tests.yml/badge.svg)](https://github.com/appiahkubis14/pygeofetch/actions)
11
+ [![Coverage](https://codecov.io/gh/appiahkubis14/pygeofetch/branch/main/graph/badge.svg)](https://codecov.io/gh/appiahkubis14/pygeofetch)
12
+
13
+ **Universal satellite data pipeline — unified access to 22+ satellite repositories with one CLI or Python API.**
14
+
15
+ </div>
16
+
17
+ ---
18
+
19
+ ## 📖 Introduction
20
+
21
+ PyGeoFetch is a **production-ready satellite data acquisition framework** that provides unified, authenticated access to 22+ Earth observation repositories — including Sentinel, Landsat, Planet, Maxar, Airbus, Copernicus, USGS, NASA, JAXA, and more — through a single consistent CLI and Python API.
22
+
23
+ The package abstracts away the authentication complexity, API fragmentation, and format inconsistencies of individual satellite providers, giving researchers and engineers a single command or function call to search, filter, download, and post-process satellite imagery at scale.
24
+
25
+ PyGeoFetch provides five core capabilities:
26
+
27
+ 1. Authenticated access to 22+ providers, with secure credential storage via system keyring (macOS Keychain, Windows Credential Manager, Linux Secret Service).
28
+ 2. Unified search across all providers, returning standardized GeoJSON, STAC, GeoParquet, or CSV results sortable by cloud cover, date, score, or satellite.
29
+ 3. Resilient parallel downloads with checksum verification, resume support, exponential backoff, and atomic writes.
30
+ 4. A chainable post-processing system for reprojection, compression, NDVI/NDWI computation, resampling, and Cloud Optimized GeoTIFF conversion.
31
+ 5. YAML pipeline orchestration with cron scheduling, webhook notifications, and full pipeline history — enabling repeatable, automated geospatial data workflows.
32
+
33
+ ---
34
+
35
+ ## 📝 Statement of Need
36
+
37
+ Accessing satellite data at scale is surprisingly fragmented. Each provider — USGS, Copernicus, Planet, Maxar, NASA — exposes a different authentication scheme, a different query API, a different download protocol, and a different file format. Researchers and engineers working across multiple providers must maintain a patchwork of custom scripts, scattered credentials, and ad hoc download logic, making workflows difficult to reproduce and brittle to maintain.
38
+
39
+ Existing tools address parts of this problem: EODAG supports several providers but lacks pipeline orchestration and commercial coverage; `pystac-client` handles STAC-compliant endpoints only; `sentinelsat` is Sentinel-specific. No single tool covers the full breadth of providers needed for operational geospatial workflows.
40
+
41
+ PyGeoFetch addresses this gap by providing:
42
+
43
+ - A **single CLI** that works identically across all 22 providers.
44
+ - A **unified Python API** with standardized result and download models, removing provider-specific boilerplate.
45
+ - A **pipeline layer** for scheduling recurring data acquisitions without external orchestration tools.
46
+ - **Production-grade resilience** — circuit breakers, retries, resume, checksum verification, and atomic writes — that make satellite downloads reliable enough for automated pipelines.
47
+
48
+ ---
49
+
50
+ ## 🚀 Key Features
51
+
52
+ ### 🛰️ 22+ Satellite Providers
53
+ - Open-access providers with no login required: Microsoft Planetary Computer, AWS Earth, Element 84, NOAA Big Data, ESA SciHub mirrors, JAXA, ISRO Bhuvan, INPE CBERS, DigitalGlobe Open Data
54
+ - Credentialled providers: USGS, Copernicus CDSE, NASA Earthdata, Planet Labs, Sentinel Hub, Maxar GBDX, Airbus OneAtlas, Alaska Satellite Facility, Google Earth Engine, OpenTopography, TerraBotics
55
+ - Supports SAR, sub-metre, STAC, optical, DEM, and LiDAR collections across providers
56
+
57
+ ### 🔍 Unified Search
58
+ - Single query across multiple providers simultaneously with merged, deduplicated results
59
+ - Filter by bounding box, geometry file, date range, cloud cover, resolution, processing level, and CQL2 expressions
60
+ - Output to table, JSON, GeoJSON, STAC ItemCollection, GeoParquet, CSV, or scene IDs
61
+
62
+ ### 📥 Resilient Downloads
63
+ - Adaptive parallel downloads with configurable concurrency
64
+ - SHA256 checksum verification, resume support, and exponential-backoff retries
65
+ - Atomic writes — no partial files ever written to disk
66
+ - Bandwidth throttling and webhook notifications on completion or failure
67
+
68
+ ### ⚙️ Post-Processing Chains
69
+ Chain operations applied immediately after download:
70
+
71
+ `unzip` → `reproject:EPSG:4326` → `compress:lzw` → `ndvi` → `resample:10` → `cog`
72
+
73
+ Full list: unzip, reproject, compress, NDVI, NDWI, composite, atmospheric correction, clip, resample, Cloud Optimized GeoTIFF, merge, pan-sharpen.
74
+
75
+ ### 📋 YAML Pipeline Orchestration
76
+ - Define search → filter → download → export workflows in YAML
77
+ - Schedule with cron expressions, list history, retry failed runs
78
+ - Docker-ready for containerized pipeline deployments
79
+
80
+ ### 🔐 Security by Default
81
+ - Credentials stored in system keyring — never logged or written to disk in plaintext
82
+ - TLS 1.2+ enforced, SSL verification always on, no telemetry, no analytics
83
+
84
+ ---
85
+
86
+ ## 📦 Installation
87
+
88
+ ```bash
89
+ # Core
90
+ pip install pygeofetch
91
+
92
+ # + Raster/vector processing (rasterio, geopandas, rioxarray)
93
+ pip install "pygeofetch[geo]"
94
+
95
+ # + Everything
96
+ pip install "pygeofetch[all]"
97
+ ```
98
+
99
+ **Requirements:** Python 3.9+
100
+
101
+ ---
102
+
103
+ ## ⚡ Quick Start
104
+
105
+ ### CLI
106
+
107
+ ```bash
108
+ # Add credentials
109
+ pygeofetch auth add usgs --username USER --password PASS
110
+ pygeofetch auth add planet --api-key YOUR_KEY
111
+
112
+ # Search
113
+ pygeofetch search run \
114
+ --bbox "-74.1,40.6,-73.7,40.9" \
115
+ --start-date 2024-01-01 \
116
+ --cloud-cover 0-15 \
117
+ --providers planetary_computer \
118
+ --output results.geojson
119
+
120
+ # Download with post-processing
121
+ pygeofetch download run \
122
+ --from-search results.geojson \
123
+ --output ./data/ \
124
+ --parallel 4 \
125
+ --verify-checksum \
126
+ --post-process "unzip,reproject:EPSG:4326,compress:lzw,cog"
127
+ ```
128
+
129
+ ### Python API
130
+
131
+ ```python
132
+ from pathlib import Path
133
+ from pygeofetch import pygeofetch
134
+ from pygeofetch.models import SearchQuery, DownloadOptions
135
+
136
+ sb = pygeofetch()
137
+ sb.add_credentials("usgs", username="user", password="pass")
138
+ sb.add_credentials("planet", api_key="PL_KEY")
139
+
140
+ results = sb.search(
141
+ SearchQuery(
142
+ bbox=(-74.1, 40.6, -73.7, 40.9),
143
+ start_date="2024-01-01",
144
+ end_date="2024-06-01",
145
+ cloud_cover_max=20,
146
+ ),
147
+ providers=["usgs", "copernicus", "planetary_computer", "aws_earth"],
148
+ )
149
+
150
+ downloads = sb.download(
151
+ results[:5],
152
+ destination=Path("./data/"),
153
+ options=DownloadOptions(parallel=4, verify_checksum=True, resume=True),
154
+ )
155
+
156
+ for dr in downloads:
157
+ print(f"✓ {dr.data_id} ({dr.bytes_downloaded // 1024 // 1024:.1f} MB)" if dr.success else f"✗ {dr.data_id}: {dr.error}")
158
+ ```
159
+
160
+ ### YAML Pipeline
161
+
162
+ ```yaml
163
+ name: weekly-sentinel2-ndvi
164
+ schedule: "0 6 * * 1"
165
+ steps:
166
+ - search:
167
+ providers: [copernicus, aws_earth, planetary_computer]
168
+ date_range: last_7_days
169
+ cloud_cover: 0-10
170
+ bbox: "-74.1,40.6,-73.7,40.9"
171
+ - filter:
172
+ expression: "data.cloud_cover < 5"
173
+ - download:
174
+ parallel: 4
175
+ output: ./raw/
176
+ verify_checksum: true
177
+ post_process: "unzip,reproject:EPSG:4326,cog"
178
+ - export:
179
+ format: cloud_optimized_geotiff
180
+ destination: s3://my-bucket/ndvi/
181
+ ```
182
+
183
+ ```bash
184
+ pygeofetch pipeline run weekly-sentinel2.yaml
185
+ pygeofetch pipeline schedule weekly-sentinel2.yaml
186
+ ```
187
+
188
+ ---
189
+
190
+ ## 📋 Documentation
191
+
192
+ Comprehensive documentation is available at **https://pygeofetch.readthedocs.io**, including:
193
+
194
+ - Full CLI reference
195
+ - Provider authentication guides
196
+ - Pipeline configuration reference
197
+ - Post-processing action catalogue
198
+ - Contributing guide
199
+
200
+ ---
201
+
202
+ ## 🤝 Contributing
203
+
204
+ Contributions of all kinds are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for full guidelines.
205
+
206
+ Good first issues include implementing stub providers to full API integrations, improving test coverage, and adding new post-processing actions.
207
+
208
+ ```bash
209
+ git clone https://github.com/appiahkubis14/pygeofetch
210
+ cd pygeofetch
211
+ pip install -e ".[dev,all]"
212
+ pytest tests/ -v
213
+ ```
214
+
215
+ ---
216
+
217
+ ## 📄 License
218
+
219
+ PyGeoFetch is free and open source software, licensed under the [MIT License](LICENSE).
@@ -0,0 +1,39 @@
1
+ """
2
+ pygeofetch v1.0.0 — Universal Satellite Data Pipeline.
3
+
4
+ Unified access to 22+ satellite data providers with a consistent
5
+ Python API and CLI. Supports authentication management, federated search,
6
+ parallel downloads, pipeline orchestration, and post-processing.
7
+
8
+ Quick Start::
9
+
10
+ from pygeofetch import pygeofetch
11
+
12
+ sb = pygeofetch()
13
+ sb.add_credentials("usgs", username="user", password="pass")
14
+
15
+ results = sb.search(
16
+ providers=["usgs", "copernicus", "planetary_computer"],
17
+ bbox=(-74.1, 40.6, -73.7, 40.9),
18
+ start_date="2024-01-01",
19
+ cloud_cover_max=20,
20
+ )
21
+
22
+ sb.download(results[:5], output="./data/", parallel=4)
23
+
24
+ CLI::
25
+
26
+ pygeofetch auth add usgs --username user --password pass
27
+ pygeofetch search run --bbox "-74,40,-73,41" --providers copernicus
28
+ pygeofetch download run --from-search results.geojson --output ./data/
29
+ pygeofetch status
30
+ pygeofetch doctor
31
+ """
32
+
33
+ __version__ = "1.0.0"
34
+ __author__ = "pygeofetch Contributors"
35
+ __license__ = "MIT"
36
+
37
+ from pygeofetch.core.engine import pygeofetch # noqa: F401
38
+
39
+ __all__ = ["pygeofetch", "__version__"]
@@ -0,0 +1 @@
1
+ """pygeofetch CLI package."""