--- id: pypgstac version: "0.9.12" license: MIT license_treatment: permissive maintenance: active --- # pypgstac — Schema, functions and a python library for storing and accessing STAC collections and items in PostgreSQL License: permissive · Maintenance: active · Downloads: 138.4K/mo ## 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 above — verify before relying. pypgstac provides Python bindings and utilities for managing Spatio-Temporal Asset Catalog (STAC) data in PostgreSQL, including search, filtering, and schema management functions. 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 pip install pypgstac uv add pypgstac poetry add pypgstac ## Installing pypgstac 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. 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 Requires a PostgreSQL database with PgSTAC schema installed; pypgstac is a Python client library, not a standalone database. 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_current - Install friction: low - Maintenance: active - Downloads: 138.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags STAC PostgreSQL Python library, spatio-temporal asset catalog database, STAC search and indexing, PostgreSQL STAC schema, geospatial catalog management, STAC collection storage, CQL2 search PostgreSQL, geospatial, stac-catalog, postgresql [View on SkillFed](https://skillfed.io/packages/pypgstac) · [View on PyPI](https://pypi.org/project/pypgstac/)