Skip to main content

SuperSTAC (Python)

SuperSTAC logo

Many catalogs. One search.

Search across STAC catalogs through one interface, with Python, Rust, or the command line.

This package provides the Python bindings for SuperSTAC.

Status: alpha. APIs are not yet stable. Pre-1.0; expect breaking changes.

superstac provides a synchronous Client and an AsyncClient for asyncio. Results are Python dictionaries. Some method names resemble pystac-client, but this is not a drop-in replacement.

Documentation

Read the SuperSTAC documentation for installation, tutorials, and API guides.

Try the Python quickstart notebook for a two-catalog search, footprint map, and GeoJSON export in Colab or Jupyter.

Upgrading from 0.1.0a2

Version 0.2.0 replaces the old Python implementation with a Rust engine. Use from superstac import Client, AsyncClient and follow the Python guide to migrate. Results are dictionaries, matched() counts returned items, and to_geojson() exports a FeatureCollection. Custom authentication hooks and the full pystac-client API are not supported. CPython 3.9 or newer is required.

Install

pip install superstac

Or from source:

git clone https://github.com/spatialnode/superstac
cd superstac/crates/python
pip install maturin
maturin develop

Quickstart

Search a single catalog

from superstac import Client

client = Client.open("https://earth-search.aws.element84.com/v1")

search = client.search(
    collections=["sentinel-2-l2a"],
    bbox=[6.0, 49.0, 7.0, 50.0],
    datetime="2024-01-01/2024-01-31",
    limit=50,
)

for item in search.items():
    print(item["id"], item["properties"]["datetime"])

print(search.matched(), "items")
fc = search.to_geojson()    # GeoJSON FeatureCollection dict

Federated across multiple catalogs

Pass a YAML-shaped dict in one call:

from superstac import Client

client = Client({
    "catalogs": [
        {"id": "earth-search", "url": "https://earth-search.aws.element84.com/v1"},
        {"id": "microsoft",    "url": "https://planetarycomputer.microsoft.com/api/stac/v1"},
    ],
    "settings": {"deduplicate_items": True, "max_concurrent_catalogs": 8},
})
client.start()

search = client.search(collections=["sentinel-2-l2a"], limit=50)
items = list(search.items())
print(search.metadata)   # per-catalog stats: queried, succeeded, failed, dedupes

Or build it up incrementally (any combination is fine):

client = Client()
client.add_catalogs([
    {"id": "earth-search", "url": "https://earth-search.aws.element84.com/v1"},
    {"id": "microsoft",    "url": "https://planetarycomputer.microsoft.com/api/stac/v1"},
])
client.update_settings({"deduplicate_items": True})
client.start()

Async

import asyncio
from superstac import AsyncClient

async def main():
    client = await AsyncClient.open("https://earth-search.aws.element84.com/v1")
    search = await client.search(collections=["sentinel-2-l2a"], limit=50)
    for item in search.items():
        print(item["id"])
    await client.shutdown()

asyncio.run(main())

Load from YAML

client = Client.from_yaml("superstac.yml")          # sync
client = AsyncClient.from_yaml("superstac.yml")     # async

License

MIT.

Release files for superstac 0.2.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 superstac 0.2.0
File Size Uploaded
superstac-0.2.0.tar.gz 173.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for superstac 0.2.0
File
superstac-0.2.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
superstac-0.2.0-cp39-abi3-manylinux_2_28_x86_64.whl CPython 3.9 abi3 Linux glibc 2.28+ x86-64 Details
superstac-0.2.0-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details
superstac-0.2.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
superstac-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 22.6 MB

Release files / superstac-0.2.0.tar.gz

Download URL superstac-0.2.0.tar.gz
Size 173.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3fbb534b5afd994e5a4bb328d24c3e48ab380f3a9ddccbbbe2f9b285dfcae18e
BLAKE2b-256 checksum
How to use checksums
40c1501ff30b3c94e3be12597f2063b82449f6189110484cc70a359ded83f151
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / superstac-0.2.0-cp39-abi3-win_amd64.whl

Download URL superstac-0.2.0-cp39-abi3-win_amd64.whl
Size 3.9 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
cfa9b8ce9dcae59f88fd657931dccfaa5988584b6fffec1926669069a30f9f1c
BLAKE2b-256 checksum
How to use checksums
d099b6a040c86a2c016cdc8f181fd1b2dc65a10fc9b1b7bb06810eb2a56b9a88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / superstac-0.2.0-cp39-abi3-manylinux_2_28_x86_64.whl

Download URL superstac-0.2.0-cp39-abi3-manylinux_2_28_x86_64.whl
Size 4.9 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
a9f6404e8e20a9f75dbd5b23555b96037c46674b4c0548d13840c848f2fbef9a
BLAKE2b-256 checksum
How to use checksums
82b1d591f388ebc5eebb9e6b577fc0a57852168896c194825a2d705f41543c15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / superstac-0.2.0-cp39-abi3-manylinux_2_28_aarch64.whl

Download URL superstac-0.2.0-cp39-abi3-manylinux_2_28_aarch64.whl
Size 4.7 MB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
581c3bb9a744ae8177625b7e59a2f6cb6598d9f93e43f0f68756b5842ae66b07
BLAKE2b-256 checksum
How to use checksums
8546fa28fef1235e15de204e372497dd51130e5e268e2a5fb0a2c09527243019
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / superstac-0.2.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL superstac-0.2.0-cp39-abi3-macosx_11_0_arm64.whl
Size 4.4 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1511f72df03a09537859234ebd7852943508eb7e6ded9465e10dddd63315b7a2
BLAKE2b-256 checksum
How to use checksums
399c95ecd8a71e92d01b952e96429c7de31715ffa8287179c5813e15db955934
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / superstac-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL superstac-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 4.5 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
bbc8e788188da99ce41ea562121cdfce3431dd8260bce28fc10e2903a466c0f2
BLAKE2b-256 checksum
How to use checksums
8dd5e4b9e7a8a7c61bf2bcc6df44b82cba8483a62982f20f005f02475694b60f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.2.0 This release

6 release 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