Last active
September 3, 2024 21:30
-
-
Save BnJam/d609609ed2cfa308c86b0c01fd23bb9d to your computer and use it in GitHub Desktop.
Accessing CREODIAS EOData blobs with `s3fs` instead of `boto3` in Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import s3fs | |
| # Up to your system admin to set these as env or make accessible | |
| access_key = "<S3_ACCESS_KEY>" | |
| secret_key = "<S3_SECRET_KEY>" | |
| eodata_host = 'http://data.cloudferro.com' | |
| s3 = s3fs.S3FileSystem( | |
| key=access_key, | |
| secret=secret_key, | |
| endpoint_url=eodata_host | |
| ) | |
| s3.ls('/') | |
| # ['DIAS', 'EOCLOUD', 'EODATA', 'HRSI', 'HRVPP'] | |
| s3.ls('EODATA/') | |
| """ | |
| ['EODATA/C3S', | |
| 'EODATA/CAMS', | |
| 'EODATA/CCM', | |
| 'EODATA/CEMS', | |
| 'EODATA/CLMS', | |
| 'EODATA/CMEMS', | |
| 'EODATA/Envisat', | |
| 'EODATA/Envisat-ASAR', | |
| 'EODATA/Global-Mosaics', | |
| 'EODATA/Jason-3', | |
| 'EODATA/Landsat-5', | |
| 'EODATA/Landsat-7', | |
| 'EODATA/Landsat-8', | |
| 'EODATA/Landsat-9', | |
| 'EODATA/SMOS', | |
| 'EODATA/Sentinel-1', | |
| 'EODATA/Sentinel-1-COG', | |
| 'EODATA/Sentinel-1-RTC', | |
| 'EODATA/Sentinel-2', | |
| 'EODATA/Sentinel-3', | |
| 'EODATA/Sentinel-5P', | |
| 'EODATA/Sentinel-6', | |
| 'EODATA/auxdata'] | |
| """ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment