pgstacrs¶
Python async API for pgstac, backed by Rust.
Usage¶
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.
Developing¶
git clone git@github.com:stac-utils/pgstacrs.git
cd pgstacrs
uv sync
scripts/test
License¶
MIT