Skip to main content

EO Satellite product catalogue retrieval by API or file system

Project description

scrappi

EO Satellite product catalogue retrieval by API or file system.

scrappi queries Earth Observation satellite product catalogues from online APIs (e.g. EODAG, Copernicus Data Space) and local file systems, and returns structured product datasets ready for download or further processing.

Warning: This software is in beta. Results should be used with caution. Please share any feedback via the issue tracker.

Usage

Virtual environment

It is always recommended to use a virtual environment for each Python project. Use your preferred environment manager, or create one with:

python -m venv venv

Activate it on Windows with venv\Scripts\activate, or on macOS/Linux with source venv/bin/activate.

Installation

Install the package and its core dependencies:

pip install -e .

Optional extras are available depending on your use case:

pip install -e ".[dev]"    # Development tools (ruff, mypy, pytest, …)
pip install -e ".[docs]"   # Documentation build (sphinx, …)

Development

Install the pre-commit hooks after cloning:

pre-commit install

When you commit, ruff will lint and format your code. If it makes corrections the commit will be aborted so you can review the changes — just commit again once you are happy.

Run the test suite with:

pytest

Quickstart

Setting credentials

Most online satellite catalogues require authentication before they can be queried for products. This can be done using the config file.

Perform a query

Once a suitable API has been identified for a product, use it to perform a query:

from scrappi.interface import perform_query
import datetime as dt

api_name = "eodag"
products = perform_query(
    api_name,
    {
        "collections": ["LANDSAT_C2L1"],
        "start_time": dt.datetime(2022, 1, 20, 7),
        "stop_time": dt.datetime(2022, 1, 20, 8, 30),
        "geom": {
            "latitude_minimum": 40,
            "longitude_minimum": 30,
            "latitude_maximum": 50,
            "longitude_maximum": 50,
        },
    },
)

Download an identified product

After querying, set a filesystem and download the products:

from scrappi.interface import download_product, make_fs

fs = make_fs("./", organise_data=False)
products.set_fs(fs)
path_list = download_product(api_name, products)

Please refer to the documentation for further information.

Compatibility

scrappi requires Python 3.11 or later and is tested on Python 3.11, 3.12, and 3.13.

Licence

scrappi is released under the GNU Lesser General Public License v3 (LGPLv3). See the LICENSE file for the full licence text.

Authors

scrappi is developed and maintained by the MetEOR Toolkit Team.

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

scrappi-0.3.8.tar.gz (925.9 kB view details)

Uploaded Source

Built Distribution

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

scrappi-0.3.8-py3-none-any.whl (612.0 kB view details)

Uploaded Python 3

File details

Details for the file scrappi-0.3.8.tar.gz.

File metadata

  • Download URL: scrappi-0.3.8.tar.gz
  • Upload date:
  • Size: 925.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scrappi-0.3.8.tar.gz
Algorithm Hash digest
SHA256 33139c3382575a5fc978fb6c5ea67f4f37280c13657f9073c3176f971e48c5ee
MD5 50178f04579c5a72e6820508329c4141
BLAKE2b-256 843a7b9d0ea9c57df752b47f04bb778f70a60b0092237422dae2377d637955eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for scrappi-0.3.8.tar.gz:

Publisher: publish.yml on meteor-toolkit/scrappi

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

File details

Details for the file scrappi-0.3.8-py3-none-any.whl.

File metadata

  • Download URL: scrappi-0.3.8-py3-none-any.whl
  • Upload date:
  • Size: 612.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scrappi-0.3.8-py3-none-any.whl
Algorithm Hash digest
SHA256 5588d48f0cabe15df3c11d9d4ddc1f9e0d37c0d2e607f69a8bf3c3fe960e4253
MD5 0763fc5f7d455c6b21213f9061e80a7f
BLAKE2b-256 ea04f06febd68b18c0b7c64d5b37397f4135b8cf40fc664dd3f75b596446d6ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for scrappi-0.3.8-py3-none-any.whl:

Publisher: publish.yml on meteor-toolkit/scrappi

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