pypgstac
Schema, functions and a python library for storing and accessing STAC collections and items in PostgreSQL
Decision gist · record as of 2026-08-14
Yes, if you are building or maintaining a STAC catalog in PostgreSQL and need Python access to query and manage it. The package is actively maintained, has no known vulnerabilities, and low install friction. Not necessary if you only need HTTP-level STAC API access or are not using PostgreSQL as your backend.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a PostgreSQL database with PgSTAC schema installed; pypgstac is a Python client library, not a standalone database.
- Low friction installation with a pure-Python wheel.
- Active maintenance: released 15 days ago with a last commit on 2026-08-10.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) allows use in commercial and proprietary projects with minimal restrictions beyond attribution.
last release 2026-07-30 (15 days) · last repo commit 2026-08-10 · 220 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 138,382 downloads/mo, #11,329 on PyPI
Alternatives
Verify before relying
pip install pypgstac
import pypgstac
from pydantic import BaseModel
# Use pypgstac with PostgreSQL connection to query STAC items- Specific API surface and method signatures available in version 0.9.12
- Whether pypgstac-rs (Rust-backed extension) is included or requires separate installation
- Performance characteristics when querying hundreds of millions of STAC items
What it is and what it does
pypgstac is a Python library for interacting with STAC (Spatio-Temporal Asset Catalog) data stored in PostgreSQL. It provides schema management, search utilities, and integration with PostgreSQL's spatial capabilities to build performant catalogs of geospatial and temporal metadata. The package is part of a larger ecosystem that includes SQL schema definitions, a Rust CLI, and migration tools—but pypgstac itself focuses on the Python read/write layer.
The library is designed to work alongside PostgreSQL drivers and is typically used in production deployments where STAC catalogs need to scale to hundreds of millions of items. It does not expose an HTTP API directly; instead, it serves as a backend for frameworks like STAC FastAPI or other applications that need programmatic access to STAC collections and items stored in a PostgreSQL database.
Use it for
- Query and filter STAC collections and items from a PostgreSQL database using CQL2 search syntax
- Manage indexing and partitioning of large STAC catalogs in production environments
- Build custom STAC API backends by integrating pypgstac with web frameworks
- Migrate or maintain STAC data stored in PostgreSQL with schema utilities
- Integrate geospatial asset metadata into Python applications backed by PostgreSQL
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are building or maintaining a STAC catalog in PostgreSQL and need Python access to query and manage it.
The package is actively maintained, has no known vulnerabilities, and low install friction. Not necessary if you only need HTTP-level STAC API access or are not using PostgreSQL as your backend.
Install
pypgstac on PyPI
Before you install
Low friction installation with a pure-Python wheel. Active maintenance: released 15 days ago with a last commit on 2026-08-10. Depends on 10 runtime packages including pydantic, orjson, and tenacity—all common, stable dependencies.
Requires a PostgreSQL database with PgSTAC schema installed; pypgstac is a Python client library, not a standalone database.
License in practice
MIT license (permissive) allows use in commercial and proprietary projects with minimal restrictions beyond attribution.
Quickstart
pip install pypgstac
import pypgstac
from pydantic import BaseModel
# Use pypgstac with PostgreSQL connection to query STAC items
Verify before relying
- Specific API surface and method signatures available in version 0.9.12
- Whether pypgstac-rs (Rust-backed extension) is included or requires separate installation
- Performance characteristics when querying hundreds of millions of STAC items
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 10 packagescachetoolsfirehydratersorjsonplpygispydanticpython-dateutilsmart-opentenacityversion-parser |
| Maintenance | Actively maintained 15 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 138,382 / month, #11,329 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: pypgstac-0.9.12-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “STAC PostgreSQL Python library”
- pypgstacpypgstac provides Python bindings and utilities for managing…
- stac-fastapi-pgstacProvides a FastAPI-based HTTP interface to PgSTAC, a PostgreSQL…
- pystac-corePySTAC Core provides the foundational API for reading, writing, and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Database packages
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.
Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.
YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.
Install it if you need to connect Python applications to YDB databases.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.
Install it if you need to manipulate, format, or analyze SQL text programmatically.
Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.
See also stac-fastapi-pgstac · pystac · stac-fastapi-extensions · stac-fastapi-api · pystac-client · pystac-core · stac-fastapi-types · odc-stac · stac-pydantic · arcosparse