Skip to main content

High-availability satellite imagery retrieval across multiple STAC catalogs.

Project description

SuperSTAC

PyPI version License

SuperSTAC is a Python library (with planned Rust backend) for high-availability satellite imagery retrieval.
Instead of relying on a single STAC endpoint (e.g., Sentinel from Element84), SuperSTAC can query multiple catalogs and automatically fall back to alternatives when a source is missing data or unavailable.

⚠️ Note: This is an early work-in-progress. The initial release is to start iterating in public. Expect breaking changes.


Features (planned)

  • Query multiple STAC catalogs through a single unified API.
  • Automatic fallback when a catalog has no data or is down.
  • Configurable authentication for protected catalogs.
  • Resolution & band matching across heterogeneous catalogs.
  • CLI and Python API for flexible workflows.
  • Optional LLM-assisted natural language queries.
  • Rust backend (planned)

Installation

pip install superstac

Configuration

SuperSTAC loads its catalog configuration from a YAML file, typically referenced via the environment variable SUPERSTAC_CATALOG_CONFIG.

Example .superstac.yml:

catalogs:
  Element84 Sentinel:
    url: https://earth-search.aws.element84.com/v0
  Planet:
    url: https://api.planet.com/stac/v1
    auth:
      type: basic
      username: youruser
      password: yourpass
  Microsoft PC:
    url: https://planetarycomputer.microsoft.com/api/stac/v1
    auth:
      type: bearer
      token: "YOUR_MICROSOFT_PC_TOKEN"

See superstac/.superstac.yml for an example config file.

Usage (very early draft)

  from superstac import get_catalog_registry, federated_search_async

  cr = get_catalog_registry()
  cr.load_catalogs_from_config()

  print("\nRunning asynchronous federated_search_async...")
  start_async = time.perf_counter()
  results_async = asyncio.run(
      federated_search_async(
          registry=cr,
          collections=["sentinel-2-l2a"],
          bbox=[6.0, 49.0, 7.0, 50.0],
          datetime="2024-01-01/2024-01-31",
          query={"eo:cloud_cover": {"lt": 20}},
          sortby=[{"field": "properties.datetime", "direction": "desc"}],
      )
  )
  end_async = time.perf_counter()
  print(
      f"Asynchronous search found {len(results_async)} items in {end_async - start_async:.2f} seconds."
  )

  for x in results_async:
      print(x.self_href)

Also see main.py.

Development Status / Roadmap

Planned enhancements:

  • Authentication configuration & documentation
  • Retry logic
  • Result modifiers
  • Catalog refresh & health checks
  • Latency tracking and fallback ranking
  • Band matching across heterogeneous catalogs
  • CLI tool
  • Example notebooks (illegal mining detection, disaster response, LLM-assisted search)

License

MIT License. See LICENSE.

Feedback, issues, and contributions are welcome! This package is at a very early stage, so opening issues for missing features or edge cases will directly shape the roadmap.

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

superstac-0.1.0a2.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

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

superstac-0.1.0a2-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file superstac-0.1.0a2.tar.gz.

File metadata

  • Download URL: superstac-0.1.0a2.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for superstac-0.1.0a2.tar.gz
Algorithm Hash digest
SHA256 fd73a8f1abbc708d2bb77b483e65582a656223834542f2c9e3e20ce241c2a07a
MD5 dfb111bf83975972ef48ce53c5f1c86d
BLAKE2b-256 62cc19871822d3cc795620458c85238a6f35da68b677e89a1ab2f0783c26920d

See more details on using hashes here.

File details

Details for the file superstac-0.1.0a2-py3-none-any.whl.

File metadata

  • Download URL: superstac-0.1.0a2-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for superstac-0.1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 e78fd18ca287212bdd0a357ee07562ab88c1648f665904eeb846daf8275b00d6
MD5 cc18265deacc4c3940a94d813dad38e0
BLAKE2b-256 9249d75db92e6bf50273800cf2ff5ac321dc8cf6ce2fc07c7983cc2e7a01a53d

See more details on using hashes here.

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