Skip to main content

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

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.1.tar.gz (73.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.1-cp313-cp313-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

copernicus_explorer-0.3.1-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.1-cp312-cp312-manylinux_2_28_aarch64.whl (3.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.9manylinux: glibc 2.28+ ARM64

copernicus_explorer-0.3.1-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.1.tar.gz.

File metadata

  • Download URL: copernicus_explorer-0.3.1.tar.gz
  • Upload date:
  • Size: 73.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.1.tar.gz
Algorithm Hash digest
SHA256 4967f323b027e90940ea40cc16c4f04572b8c3615ef184e608a3138387eed6e2
MD5 80c7d8dacdf8a8f030346a3fa9520618
BLAKE2b-256 da93e0e09f00a9a59b0717cedd51be2631d9affeaef079fb29fbceb5b04cc8f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for copernicus_explorer-0.3.1.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.1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for copernicus_explorer-0.3.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 fdf91b6960891b3ee673b8d5da6a539c5ff0647faf019498fe6186f23b13c8af
MD5 4897ac93bbd7341a23af20d147377499
BLAKE2b-256 95d5eddc364954654b8f23f765fa6dd39e412a135ffcec00cc4f17601ee96abe

See more details on using hashes here.

Provenance

The following attestation bundles were made for copernicus_explorer-0.3.1-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.1-cp313-cp313-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for copernicus_explorer-0.3.1-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1308dd3b182f384f0798dccc50d999bb93bb342655e97b85183fe8e22d278636
MD5 c48d41a8f87719992fc24e064a6c484d
BLAKE2b-256 3a0de15bdf95db62d62ed780e9fbb5cd937bc17c2e4635cebe865c7ff386ef58

See more details on using hashes here.

Provenance

The following attestation bundles were made for copernicus_explorer-0.3.1-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.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for copernicus_explorer-0.3.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e109df3ab25b0c2369f75e6130eb3b718a5d09afffdf20223907e99a2c15a0a7
MD5 0fafcc0ce1cee624c480f5bfe2740abc
BLAKE2b-256 1c3e002eeb638dfd0185a11aba4250c2dac555d9b7a6ea5b9e50f699aca34697

See more details on using hashes here.

Provenance

The following attestation bundles were made for copernicus_explorer-0.3.1-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.1-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for copernicus_explorer-0.3.1-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 fa176b671cfd3cca705146008c5ba943d3576d8896b004e97a9a11bf4b48553f
MD5 3b72879100e4cfa166f7a0943ccb1782
BLAKE2b-256 c8bdedabfb3d82d0f42c5c17e048370bba6a304ac84c01255743550f18306e72

See more details on using hashes here.

Provenance

The following attestation bundles were made for copernicus_explorer-0.3.1-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.1-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for copernicus_explorer-0.3.1-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ec3f8ec3d2117b1a76e94b5bbe1a0edef3db513316e109338d9d657cedf0b9ba
MD5 b0d57ebbade979c378ac728e0c34980e
BLAKE2b-256 48acc5199ca038cae7c3713550b16fd76e3a8f2e213af79903519de357c3ba41

See more details on using hashes here.

Provenance

The following attestation bundles were made for copernicus_explorer-0.3.1-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.1-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for copernicus_explorer-0.3.1-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2460b27f3dd53ab48e9650d284b68af642cf92118f0df9f24c7ff66b24baf66f
MD5 c5e6e944e6a8e3b89613b9a0eec3ef3a
BLAKE2b-256 c06c04aeb06ca6e5a07a6d1d18985aff8cf3ddfde8dc87b055b8d82847693c85

See more details on using hashes here.

Provenance

The following attestation bundles were made for copernicus_explorer-0.3.1-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.1-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for copernicus_explorer-0.3.1-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 97637d30f077675e5ef2abece1e68e86bd81eb4ed4a3476711197f5b4a52799e
MD5 e6f0f9ff3bfbc199005ab7963790c4f8
BLAKE2b-256 a864ccc33738789cf549f9e74619a9e021b47309236d5d6bee4d61c1634917c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for copernicus_explorer-0.3.1-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.1-cp39-cp39-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for copernicus_explorer-0.3.1-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 95fe08e510f129e7ee98a7e994a800ebb1fc765d6c15a4b030cb35921e745170
MD5 2ce2de6278aca050fddcdbeb9c57630d
BLAKE2b-256 20dc0dcc137f6ec0d6124723f78a6b8941d4b2c50e6cd7a6f3b47d203ec5567d

See more details on using hashes here.

Provenance

The following attestation bundles were made for copernicus_explorer-0.3.1-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.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for copernicus_explorer-0.3.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 afc1aecbba4e7e67a4d13860630e426f16abbbd9471a3c8028daa409d9767def
MD5 03e0f77ca4103db78f198e4ec0c637f3
BLAKE2b-256 abac2f35636fbde570e63f424630448e5f19fcefa57924323137d331901ea42d

See more details on using hashes here.

Provenance

The following attestation bundles were made for copernicus_explorer-0.3.1-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