You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pgstacrs will be a "full access" Python API for pgstac backed by the pgstac crate.
Prior art
pypgstac is a Python package that interacts with a pgstac database. It's mostly used via it's command-line interface (CLI). It's primary issue is that it is currently tightly-coupled to the pgstac version, meaning that its "impossible" to release new Python package features without releasing a new database schema version 😢. There is (in my opinion) a good argument for keeping Rust code out of the pgstac repo, because that repo does enough stuff already.
stac-fastapi-pgstac does a lot of custom SQL queries to pgstac PostgreSQL functions that could be refactored out to their own API. The goal here would be for stac-fastapi-pgstac to contain zero SQL 🤯
Integration and goals
The plan is that pgstacrs will live "above" pypgstac and stac-fastapi-pgstac in the dependency chain:
graph LR
pgstacrs --> pypgstac
pgstacrs --> stac-fastapi-pgstac
Loading
To do this, pgstacrs will:
Expose every public pgstac PostgreSQL function via a Python function/method
Provide a pooled client that can be used directly from stac-fastapi-pgstac for efficient server-side queries
Provide "smart loading" that can be used via the pypgstac CLI or via a Python API to load collections and items into the database The Right Way™
Provide backward compatibility, meaning that (from some point) it will continue to support older pgstac versions
Integrate with pystac objects
Examples
Here's some rough sketches of what pgstacrs might look like:
Only thing that I'd modify there is that pgstacrs will expose every public pgstac function. There are a number of functions in pgstac that are purely internal.
Overview
pgstacrs will be a "full access" Python API for pgstac backed by the pgstac crate.
Prior art
Integration and goals
The plan is that pgstacrs will live "above" pypgstac and stac-fastapi-pgstac in the dependency chain:
To do this, pgstacrs will:
Examples
Here's some rough sketches of what pgstacrs might look like:
The text was updated successfully, but these errors were encountered: