Skip to main content

sentinel2-data-alerts

Monitor Copernicus Data Space for new satellite imagery over your sites of interest and receive instant Slack alerts with direct links to the Copernicus Browser.

Supported Sensors

Sensor Collection Type
Sentinel-2 SENTINEL-2 L1C Optical (SWIR false-colour)
Sentinel-1 SENTINEL-1 GRD SAR (VV/VH polarisation)
Landsat-8 LANDSAT-8 L1 Optical (SWIR)
Landsat-9 LANDSAT-9 L1 Optical (SWIR)

Installation

pip install sentinel2-data-alerts

Or install from source:

git clone https://github.com/your-org/sentinel2-data-alerts.git
cd sentinel2-data-alerts
pip install .

To include next-overpass predictions in Slack alerts (powered by satpass):

pip install "sentinel2-data-alerts[predict]"

Configuration

Create a .env file in the directory where you'll run the tool (or copy .env.example):

cp .env.example .env

Then fill in your credentials:

# Copernicus Data Space credentials
# Register at https://dataspace.copernicus.eu/
CDSE_USERNAME=your-email@example.com
CDSE_PASSWORD=your-password

# Default Slack webhook URL for notifications
SLACK_WEBHOOK_URL=https://hooks.slack.com/triggers/YOUR/WEBHOOK/URL

# Polling interval in seconds (default: 3600)
POLL_INTERVAL_SECONDS=300

# How many hours back to query for new products (default: 24)
QUERY_HOURS=12

# Path to DuckDB database (default: ./sentinel2_reports.duckdb)
# DB_PATH=./sentinel2_reports.duckdb

Usage

Add monitoring sites

# Basic — uses the default Slack webhook
sentinel2-alerts addsite "Huelva Refinery" 37.18 -6.88

# With a custom webhook for this site
sentinel2-alerts addsite "Rotterdam Port" 51.95 4.13 --webhook https://hooks.slack.com/triggers/YOUR/OTHER/WEBHOOK

Manage sites

# List all sites and their status
sentinel2-alerts listsites

# Remove a site
sentinel2-alerts removesite "Huelva Refinery"

Per-site webhook management

Each site can optionally have its own Slack webhook URL. If not set, the default SLACK_WEBHOOK_URL from your .env is used.

# Set a custom webhook for an existing site
sentinel2-alerts setwebhook "Rotterdam Port" https://hooks.slack.com/triggers/YOUR/WEBHOOK

# Remove the custom webhook (revert to default)
sentinel2-alerts removewebhook "Rotterdam Port"

Start polling

# Start the monitoring loop (polls every POLL_INTERVAL_SECONDS)
sentinel2-alerts poll

# Or simply (poll is the default command):
sentinel2-alerts

The poller will:

  1. Authenticate with Copernicus Data Space
  2. Query for new products across all four sensors
  3. Check if any products intersect your monitored sites
  4. Send a Slack alert for each new product with:
    • Product name and acquisition date
    • A shortened link to view in Copernicus Browser
    • A quicklook thumbnail (when available)
    • Next overpass forecast for the same sensor at that location (requires [predict] extras)
  5. Track reported products in a local DuckDB database to avoid duplicate alerts

Send a test notification

sentinel2-alerts test

Use a custom database path

# Via CLI flag
sentinel2-alerts --db /path/to/my.duckdb listsites

# Or via environment variable
DB_PATH=/path/to/my.duckdb sentinel2-alerts poll

Running with python -m

If you prefer not to use the CLI entry point:

python -m sentinel2_data_alerts poll
python -m sentinel2_data_alerts addsite "My Site" 51.5 -0.1

Overpass Prediction (Optional)

When installed with pip install "sentinel2-data-alerts[predict]", each Slack alert automatically includes a forecast of the next satellite overpass for that sensor at the alerted site's location.

This is powered by satpass, which sources acquisition plans from ESA (Sentinel-1/2 KML plans) and USGS (Landsat cycle data). Predictions are cached locally and refreshed every 12 hours.

You can also use the overpass module directly:

from sentinel2_data_alerts.overpass import get_next_overpass, format_overpass_line

result = get_next_overpass(lat=51.5, lon=-0.1, collection="SENTINEL-2")
# {'satellite': 'sentinel2', 'platform': 'S2A', 'date': datetime(...), 'orbit': 94}

print(format_overpass_line(result))
# :crystal_ball: Next overpass: *2026-07-23 10:56 UTC* (S2A) orbit 94

Supported collections: SENTINEL-2, SENTINEL-1, LANDSAT-8, LANDSAT-9.

Development

git clone https://github.com/your-org/sentinel2-data-alerts.git
cd sentinel2-data-alerts
pip install -e ".[predict]"

Download files

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

Source Distribution

sentinel2_data_alerts-0.2.0.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

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

sentinel2_data_alerts-0.2.0-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file sentinel2_data_alerts-0.2.0.tar.gz.

File metadata

  • Download URL: sentinel2_data_alerts-0.2.0.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sentinel2_data_alerts-0.2.0.tar.gz
Algorithm Hash digest
SHA256 db11442c341b34530f9de45fd060a7cce30f94d7c820c073ce0e0d5fbf01eca8
MD5 8a0a58510b4caec46df2a8078a3d83a4
BLAKE2b-256 dd5cd52baa0cd833ff54a88816f3bd3971501bfaab2bf0d5a06f332f57c96ef7

See more details on using hashes here.

File details

Details for the file sentinel2_data_alerts-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: sentinel2_data_alerts-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sentinel2_data_alerts-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8b62058c806b5f253f78a269a91d73f8bc1c9962a4e3d0c970ecc7bf1d27b58
MD5 db6a059b9f4e88fb8f267fa0fca4fd7b
BLAKE2b-256 f9b8c3fe364891bc881e486cfd7f5bb9a80b929e53fee704932d0c31cb169e55

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page