Python async API for pgstac, backed by Rust. pgstacrs is tested against the following pgstac versions:
python -m pip install pgstacrs
Then:
from pgstacrs import Client
# Search
client = await Client.open("postgresql://username:password@localhost:5432/pgstac")
feature_collection = await client.search(
collections=["collection-a"], # or collections="collection-a"
intersects={"type": "Point", "coordinates": [-105.1019, 40.1672]},
sortby="-datetime",
)
# CRUD
await client.create_item({"type": "Feature", "id": "foo", ...})
await client.delete_item("foo")
await client.create_items([...])
See the documentation for more.
git clone [email protected]:stac-utils/pgstacrs.git
cd pgstacrs
uv sync
scripts/test
MIT