Skip to content

Latest commit

 

History

History
53 lines (38 loc) · 1.51 KB

README.md

File metadata and controls

53 lines (38 loc) · 1.51 KB

pgstacrs

GitHub Actions Workflow Status GitHub Actions Workflow Status

Python async API for pgstac, backed by Rust. pgstacrs is tested against the following pgstac versions:

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

Get Rust and uv. Then:

git clone [email protected]:stac-utils/pgstacrs.git
cd pgstacrs
uv sync
scripts/test

License

MIT