Skip to main content

egms-client

Async Python client for the archive of EGMS, the European Ground Motion Service (Copernicus Land Monitoring Service): ground velocity from Sentinel-1 InSAR over all of Europe.

  • Authentication with a CLMS service key: no browser, no copied links.
  • Search and download of Ortho L3 tiles (100 m, vertical and east-west), keeping only the mean-velocity GeoTIFF, cached on disk.
  • Mosaics of tiles over any rectangle, with no resampling (extra raster).

ci PyPI

Why a library

The EGMS Explorer is built for clicking. The archive behind it has an API, but the parts that matter are undocumented, and each one fails quietly:

You try What happens
any call without a login HTTP 200 with {"status": false, "message": "Please log in…"}
the id in a download link as a credential it is the id of a search, and it expires: HTTP 401
a tile at sea status: false and Invalid tile ID, not an empty search
building the file name yourself the trailing _1 is a sub-release: read it from the hit
a malformed token assertion HTTP 500 DecodeError, not 401: retries won't help
comparing CRS by name four tiles of 2020-2025 say IGNF:ETRS89LAEA, not EPSG:3035
expecting 2021-2025 after 2020-2024 the next release was 2020-2025: windows grow

All checked against the live archive on 3 November 2026.

Install

pip install egms-client           # auth, search, download
pip install "egms-client[raster]" # + mosaics (numpy, rasterio, pyproj)

Credentials

Create a service key at land.copernicus.eu: EU Login, profile, API Tokens, Create new token. You get a JSON file with client_id, user_id, private_key and token_uri. It does not expire; keep it out of your repository.

Use

import asyncio
from pathlib import Path

import httpx

from egms_client import EgmsArchive, ServiceKey, tiles_for_bounds
from egms_client.mosaic import mosaic

key = ServiceKey.from_json(Path("clms-service-key.json").read_text())


async def main() -> None:
    async with httpx.AsyncClient(timeout=120) as client:
        archive = EgmsArchive(client, key)
        print(await archive.releases())  # ['2020-2024', '2020-2025']

        # Rectangle in EPSG:3035 metres
        bounds = dict(minx=4_700_000, miny=1_900_000, maxx=4_799_999, maxy=1_999_999)
        tiffs = []
        for tile in tiles_for_bounds(*bounds.values()):
            path = await archive.fetch_tile(tile, "U", "2020-2025", Path("egms"))
            if path is not None:  # None: the tile is at sea or not covered
                tiffs.append(path)

    vertical = mosaic(tiffs, **bounds)
    print(vertical.values.shape, vertical.left, vertical.top)  # (1000, 1000) 4700000.0 2000000.0


asyncio.run(main())

fetch_tile keeps the GeoTIFF (~4 MB) and drops the ~60 MB ZIP. It remembers both outcomes in the directory (the file, or an …absent marker), so running it again for a whole country sends no request. The token is renewed five minutes before its hour runs out.

Bring your own HTTP

Everything EgmsArchive does is also exposed as pure functions, for callers with their own HTTP and retry layer: token_request / parse_token, search_body / parse_search / latest_hit, parse_releases, download_url / check_download / extract_tiff.

Data licence

EGMS is © European Union, Copernicus Land Monitoring Service, free and open under the Copernicus data policy: anything you publish from it must credit the source.

Extracted from Limen, which uses the vertical and east-west velocities per 1 km cell as ground motion features for landslide risk.

Development

uv sync
make check

License

Code: Apache-2.0.

Metadata

Release files for egms-client 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for egms-client 0.1.0
File Size Uploaded Provenance Actions
egms_client-0.1.0.tar.gz 15.3 kB With provenance Details for egms_client-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for egms-client 0.1.0
File Interpreter ABI Platform Actions
egms_client-0.1.0-py3-none-any.whl Python 3 none any Details for egms_client-0.1.0-py3-none-any.whl

Total release size: 32.6 kB

Release files / egms_client-0.1.0.tar.gz

Download URL egms_client-0.1.0.tar.gz
Size 15.3 kB
Tags Source
SHA-256 checksum
How to use checksums
dcdb2c9b13eb2179216c7e8a9eff6f1bdd936dd4b37c5524a04b1a8f5e7cf090
BLAKE2b-256 checksum
How to use checksums
3075eea17c1198d2ddf63649b62b162df7ec1a025ad40e934827abaf678b9725
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / egms_client-0.1.0-py3-none-any.whl

Download URL egms_client-0.1.0-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c56007cd2b4dbf5b4a0ccee38252633182543b23d8c012a737047a45f7542d54
BLAKE2b-256 checksum
How to use checksums
0f312c41400bb3d4310f7eefd5a0bc6cec7620fcc740d2138f546b9dc229d2a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for egms-client 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for egms_client-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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