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.6.tar.gz (924.7 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.6-py3-none-any.whl (611.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scrappi-0.3.6.tar.gz
  • Upload date:
  • Size: 924.7 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.6.tar.gz
Algorithm Hash digest
SHA256 9833b8f0afc9ee729f383fc0c297fc5cb0e63acb86a94ca0d7b10878a6aa1dd3
MD5 e40d270707865a7aae6c03b0d70c77bf
BLAKE2b-256 e74f687ee1adaea785a008b7eb0351f76e221b89a54a3d4276f3a6777dd119cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for scrappi-0.3.6.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.6-py3-none-any.whl.

File metadata

  • Download URL: scrappi-0.3.6-py3-none-any.whl
  • Upload date:
  • Size: 611.6 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 1f400445717f07accf4055986b0b724ce7dbcf701164387c54200d052cbd2f80
MD5 357dbfae3dffc031f3b83bbf3132eec7
BLAKE2b-256 99429178b44d1b2e8f7b9a2e62f1abfb959731fd2f568cacdc524d411171e2c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for scrappi-0.3.6-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