Skip to main content

Browse and download Sentinel satellite products from the Copernicus Data Space Ecosystem (CDSE)

Reason this release was yanked:

Issue with the README file which prevent from a successful installation

Project description

Copernicus Explorer

PyPI Python License: MIT

A Python package for browsing and downloading Sentinel satellite products from the Copernicus Data Space Ecosystem (CDSE).

Built on a native Rust core via PyO3, it runs at full compiled speed with no serialization overhead.

Features

  • Search the CDSE catalogue by satellite, product type, date range, cloud cover, tile ID, point, bounding box, or GeoJSON geometry
  • Download scenes by name with Bearer-token authentication, to local filesystem or directly to an S3-compatible bucket
  • Batch download multiple products concurrently with configurable parallelism
  • Authenticate against the CDSE OAuth2 identity provider
  • Supports Sentinel-1, -2, -3, -5P, and -6
  • Includes a CLI (copernicus-explorer) for quick terminal usage

Installation

pip install copernicus-explorer

Prerequisites

  • Python 3.9+
  • A free Copernicus Data Space account (required for authentication and downloads; searching is anonymous)

Quick start

Search for products

from datetime import datetime, timedelta, timezone
import copernicus_explorer_py as ce

query = ce.SearchQuery(ce.Satellite.sentinel2())
query.product("L2A")
query.dates(
    datetime.now(timezone.utc) - timedelta(days=20),
    datetime.now(timezone.utc),
)
query.max_cloud_cover(30.0)
query.geometry_point(ce.Point(43.6, 1.44))
query.max_results(5)

products = query.execute()
ce.print_products(products)

Search with a GeoJSON file

import copernicus_explorer_py as ce

query = ce.SearchQuery(ce.Satellite.sentinel2())
query.product("L2A")
query.geometry_geojson("roi.geojson")
query.max_cloud_cover(30.0)
query.max_results(5)

products = query.execute()
ce.print_products(products)

The method also accepts a raw GeoJSON string instead of a file path.

Download a single scene

token = ce.get_access_token_from_env()
path = ce.download_scene(products[0].name, "./data", token)
print(f"Downloaded to {path}")

Download by product ID

If you already have the CDSE product UUID (e.g. from a previous search), you can skip the name-to-ID resolution query:

token = ce.get_access_token_from_env()
path = ce.download_by_id(products[0].id, "./data", token)
print(f"Downloaded to {path}")

Download directly to an S3 bucket

Pass an s3:// URI as the directory and optionally point to a credentials file:

token = ce.get_access_token_from_env()
path = ce.download_by_id(
    products[0].id,
    "s3://my-bucket/SAFE/",
    token,
    s3_config="~/.config/copernicus_explorer/s3.conf",
)
print(f"Uploaded to {path}")

S3 credentials are resolved in order: s3_config argument, default config at ~/.config/copernicus_explorer/s3.conf, then environment variables (S3_*, then AWS_*). The config file uses rclone-style INI format where the section name matches the bucket name:

[my-bucket]
access_key_id = ...
secret_access_key = ...
region = sbg
endpoint = https://s3.sbg.perf.cloud.ovh.net

If the file contains multiple sections, the one matching the bucket from the s3:// URI is used. If no section matches, resolution falls back to environment variables.

Variable (checked first) Fallback variable
S3_ACCESS_KEY_ID AWS_ACCESS_KEY_ID
S3_SECRET_ACCESS_KEY AWS_SECRET_ACCESS_KEY
S3_ENDPOINT AWS_ENDPOINT_URL
S3_REGION AWS_REGION

Batch download with concurrency

token = ce.get_access_token_from_env()
results = ce.download_products(products, "./data", token, max_concurrent=3)

for product, result in zip(products, results):
    if result is not None:
        print(f"  OK: {product.name} -> {result}")
    else:
        print(f"  FAILED: {product.name}")

Authenticate explicitly

token = ce.get_access_token("you@example.com", "yourpassword")

Or via environment variables:

export COPERNICUS_USER="you@example.com"
export COPERNICUS_PASS="yourpassword"
token = ce.get_access_token_from_env()

CLI usage

Installing the package also provides the copernicus-explorer command:

copernicus-explorer [OPTIONS] COMMAND [ARGS]...

Commands:
  search    Search the CDSE catalogue for satellite products
  download  Download one or more scenes by name
  auth      Test authentication and print a token summary

search

Search the catalogue. Dates default to the last 30 days if omitted.

# Sentinel-2 L2A near Toulouse, max 30% cloud cover
copernicus-explorer search sentinel-2 -p L2A --point 43.6,1.44 -c 30

# Sentinel-1 GRD over the Alps with explicit date range
copernicus-explorer search sentinel-1 -p GRD \
  --bbox 47.5,6.0,45.5,11.0 \
  --start 2026-03-01 --end 2026-03-24

# Sentinel-2 by tile, limit to 3 results
copernicus-explorer search sentinel-2 -p L2A --tile T31TFJ -n 3

# Search using a GeoJSON file as the area of interest
copernicus-explorer search sentinel-2 -p L2A --geojson roi.geojson -c 30
Flag Description
SATELLITE sentinel-1, sentinel-2, sentinel-3, sentinel-5p, sentinel-6
-p, --product TYPE Product type filter (e.g. L2A, L1C, GRD)
--start YYYY-MM-DD Start of acquisition window (default: 30 days ago)
--end YYYY-MM-DD End of acquisition window (default: today)
--tile TILE Sentinel-2 tile identifier (e.g. T31TFJ)
-c, --cloud 0-100 Maximum cloud cover percentage
--point LAT,LON Point geometry (e.g. 43.6,1.44)
--bbox TLAT,LLON,BLAT,RLON Bounding box (e.g. 47.5,6.0,45.5,11.0)
--geojson FILE GeoJSON file defining the area of interest
-n, --max-results N Maximum number of results (default: 10)

download

Download one or more scenes by name or by CDSE product ID. Requires authentication.

# Single scene by name
copernicus-explorer download \
  "S2B_MSIL2A_20260315T105019_N0512_R051_T31TCJ_20260315T144522.SAFE" \
  -o ./data

# Multiple scenes concurrently (max 4 in parallel by default)
copernicus-explorer download \
  "S2B_MSIL2A_20260315T105019_N0512_R051_T31TCJ_20260315T144522.SAFE" \
  "S2A_MSIL2A_20260317T104021_N0512_R008_T31TCJ_20260317T160837.SAFE" \
  -o ./data -j 2

# Download by product UUID (skips the name-to-ID resolution query)
copernicus-explorer download --id \
  "a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
  -o ./data

# Download directly to an S3-compatible bucket
copernicus-explorer download --id \
  "a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
  -o s3://my-bucket/SAFE/ --s3-config ~/.config/copernicus_explorer/s3.conf
Flag Description
SCENES... One or more scene names or product IDs (depending on --id)
--id Treat arguments as CDSE product UUIDs instead of scene names
-o, --output-dir DIR or S3 URI Output directory or s3://bucket/prefix/ (default: .)
--s3-config FILE Path to S3 credentials config file (rclone-style INI)
-j, --concurrent N Maximum concurrent downloads (default: 4)
-u, --user USER Username (or set COPERNICUS_USER)
-P, --password PASS Password (or set COPERNICUS_PASS)

auth

Test your credentials:

copernicus-explorer auth
copernicus-explorer auth -u you@example.com -P yourpassword

Python API reference

Classes

Class Constructor Key methods / attributes
Satellite Satellite.sentinel1(), .sentinel2(), .sentinel3(), .sentinel5p(), .sentinel6() .collection_name(), .known_products(), .is_valid_product(str)
SearchQuery SearchQuery(satellite) .product(str), .dates(start, end), .tile(str), .max_cloud_cover(float), .geometry_point(Point), .geometry_bbox(BoundingBox), .geometry_geojson(str), .max_results(int), .execute()
Product returned by SearchQuery.execute() .name, .id, .acquisition_date, .publication_date, .online, .cloud_cover
Point Point(lat, lon) .lat, .lon
BoundingBox BoundingBox((lat, lon), (lat, lon)) .upper_left, .lower_right

Functions

Function Description
get_access_token(username, password) Authenticate and return an access token string
get_access_token_from_env() Authenticate using COPERNICUS_USER / COPERNICUS_PASS env vars
download_scene(scene_name, directory, token, s3_config=None) Download a single scene by name; returns the output file path (or S3 URI)
download_by_id(id, directory, token, s3_config=None) Download a single product by CDSE UUID; skips name-to-ID resolution
download_products(products, directory, token, max_concurrent=4, s3_config=None) Download multiple products concurrently; returns a list of paths (None on failure)
get_scene_id(scene_name) Resolve a scene name to its CDSE UUID
format_products(products) Format a list of products as a table string
print_products(products) Print a formatted product table to stdout

Relation to the Rust crate

This package is the Python interface to the copernicus_explorer Rust library. The Python import name is copernicus_explorer_py while the CLI command is copernicus-explorer (same name as the Rust CLI).

If you are looking for the Rust library or the Rust-built CLI binary, see the main repository README.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

copernicus_explorer-0.3.0.tar.gz (69.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

copernicus_explorer-0.3.0-cp313-cp313-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.13Windows x86-64

copernicus_explorer-0.3.0-cp313-cp313-manylinux_2_28_aarch64.whl (3.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

copernicus_explorer-0.3.0-cp313-cp313-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

copernicus_explorer-0.3.0-cp313-cp313-macosx_10_12_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

copernicus_explorer-0.3.0-cp312-cp312-manylinux_2_28_aarch64.whl (3.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

copernicus_explorer-0.3.0-cp311-cp311-manylinux_2_28_aarch64.whl (3.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

copernicus_explorer-0.3.0-cp310-cp310-manylinux_2_28_aarch64.whl (3.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

copernicus_explorer-0.3.0-cp39-cp39-manylinux_2_28_aarch64.whl (3.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ ARM64

copernicus_explorer-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file copernicus_explorer-0.3.0.tar.gz.

File metadata

  • Download URL: copernicus_explorer-0.3.0.tar.gz
  • Upload date:
  • Size: 69.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for copernicus_explorer-0.3.0.tar.gz
Algorithm Hash digest
SHA256 dbed51eb07ec4991b4543e8dca73bc8271a65e1d4eb330193ac4ca25418eab65
MD5 efac5cf2c5bbc156dc5ceaf6f8b03a2c
BLAKE2b-256 de6d983976fba0b2b0a23e32cb2253d912d0220e385658fcb5a4ceb6bd205e57

See more details on using hashes here.

Provenance

The following attestation bundles were made for copernicus_explorer-0.3.0.tar.gz:

Publisher: release.yml on vlevasseur073/copernicus_explorer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file copernicus_explorer-0.3.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for copernicus_explorer-0.3.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8a904e607ee596fa6bb1c50bb39b844a5cc576b24aefca23ba4ec98b042975df
MD5 c0501c901ea5ff67e96f2c60858f78a8
BLAKE2b-256 082fef566f1f82659333361b28c42561987e1cfdc7d2127c53840db722eba395

See more details on using hashes here.

Provenance

The following attestation bundles were made for copernicus_explorer-0.3.0-cp313-cp313-win_amd64.whl:

Publisher: release.yml on vlevasseur073/copernicus_explorer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file copernicus_explorer-0.3.0-cp313-cp313-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for copernicus_explorer-0.3.0-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3608d4b253ea7de4ac9ce502b699a605dd98b17cbc822d250c593e7948a6d726
MD5 f8ed6edf0a9c5a06553ae3bd957fb1a7
BLAKE2b-256 85dd947a96d6ef006aad0bc13b2609024396bad700d923c71f97336f77773622

See more details on using hashes here.

Provenance

The following attestation bundles were made for copernicus_explorer-0.3.0-cp313-cp313-manylinux_2_28_aarch64.whl:

Publisher: release.yml on vlevasseur073/copernicus_explorer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file copernicus_explorer-0.3.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for copernicus_explorer-0.3.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3b325fbd72af52854cf197e71bde57dd1e157f0e3df49db45f6c4e8665d02761
MD5 02b1d8c5eae4e1dc2a1372cca9f52e6f
BLAKE2b-256 5e337e83d611f9278f7c80e58c4d907337501050e6a1dd282886000d1cf024ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for copernicus_explorer-0.3.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: release.yml on vlevasseur073/copernicus_explorer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file copernicus_explorer-0.3.0-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for copernicus_explorer-0.3.0-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7bf6fb4d825dfa59bb0542b3300e6ee48616ab11c65d8370e08b9e48165c9e0d
MD5 be92d1aaa4642502fb038920c556dc63
BLAKE2b-256 4406c71f28f78de715762dbf5d780ed17a541515c0a81ba5623cd5214888574e

See more details on using hashes here.

Provenance

The following attestation bundles were made for copernicus_explorer-0.3.0-cp313-cp313-macosx_10_12_x86_64.whl:

Publisher: release.yml on vlevasseur073/copernicus_explorer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file copernicus_explorer-0.3.0-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for copernicus_explorer-0.3.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b4e85c0fda90bfd4e58bf39d759674d19a7b495557589b6bd8d52ed93ce016f8
MD5 ec9800de8f132154661a58a4c43a5426
BLAKE2b-256 d78ea36ede7fbf119cffaebf9285dd5231125344e4131126babf1bf7b4519b12

See more details on using hashes here.

Provenance

The following attestation bundles were made for copernicus_explorer-0.3.0-cp312-cp312-manylinux_2_28_aarch64.whl:

Publisher: release.yml on vlevasseur073/copernicus_explorer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file copernicus_explorer-0.3.0-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for copernicus_explorer-0.3.0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6e3b7b739eea3f6d2bb0b27f30dc833828b679545299cb10d4e4f27ab345e2d4
MD5 7212a57d7c99a87da68091c7fc8eeaf4
BLAKE2b-256 e6875ce40fc620e257906a3005b4f2dfa7251eb1b176fcdaf8076bc764d04147

See more details on using hashes here.

Provenance

The following attestation bundles were made for copernicus_explorer-0.3.0-cp311-cp311-manylinux_2_28_aarch64.whl:

Publisher: release.yml on vlevasseur073/copernicus_explorer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file copernicus_explorer-0.3.0-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for copernicus_explorer-0.3.0-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8ec9680eb52da1fe2673d0c1076dd34f0b7d79a5724b6ffe75108adcbe3b4a5f
MD5 d088aec7b26bf74032958324a4a2c1db
BLAKE2b-256 639f26a92b8c778c59d55710971b52b9516665a6dcea2cfbd8e5370a8a7bfb65

See more details on using hashes here.

Provenance

The following attestation bundles were made for copernicus_explorer-0.3.0-cp310-cp310-manylinux_2_28_aarch64.whl:

Publisher: release.yml on vlevasseur073/copernicus_explorer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file copernicus_explorer-0.3.0-cp39-cp39-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for copernicus_explorer-0.3.0-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3b6f59e4bcfb0ae6dd86a4f44bc09d9e7d04b23c87872e3c6854a3d1285a0c27
MD5 0b73c849e63b72a423c680391044a057
BLAKE2b-256 5b6717d6a1c3f809db539c4335127f0795f619b3d7ad05eef416cb6c41fb768e

See more details on using hashes here.

Provenance

The following attestation bundles were made for copernicus_explorer-0.3.0-cp39-cp39-manylinux_2_28_aarch64.whl:

Publisher: release.yml on vlevasseur073/copernicus_explorer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file copernicus_explorer-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for copernicus_explorer-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8835376e2921fb1f88575b9b62969881fc2abedcc956ac9b16d8b3647b1c1e86
MD5 df2be61bda3366528e81f85b103d6140
BLAKE2b-256 b6722c5052be55823da0592ab26b988c1ec794dbc71942e835046d58d7fb82c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for copernicus_explorer-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on vlevasseur073/copernicus_explorer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page