stac-fastapi-pgstac
An implementation of STAC API based on the FastAPI framework and using the pgstac backend.
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and is MIT-licensed. Install it if you need a production-ready STAC API server backed by PostgreSQL. Prerequisite: you must provision a PgSTAC database schema and have PostgreSQL with PostGIS available; the package itself is the HTTP layer, not a standalone database.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a running PostgreSQL database with PgSTAC schema installed and pypgstac package available; Python >=3.11
- Low install friction with a pure-Python wheel.
- Active maintenance with a recent release 51 days ago and a commit history through August 2026.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) allows commercial and private use with minimal restrictions, making it suitable for both open and proprietary deployments.
last release 2026-06-24 (51 days) · last repo commit 2026-08-04 · 111 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 80,082 downloads/mo, #14,322 on PyPI
Alternatives
Verify before relying
# Install
pip install stac-fastapi-pgstac
# Minimal usage (requires PgSTAC database configured)
from stac_fastapi_pgstac.app import StacApi
from stac_fastapi_pgstac.config import Settings
settings = Settings()
app = StacApi.build(settings=settings)- Whether PgSTAC database schema and pypgstac package are automatically provisioned or require separate setup
- Performance characteristics for repositories with millions of records beyond datetime sorting
- Whether Docker Compose is required for local development or if PostgreSQL/PostGIS can be configured standalone
What it is and what it does
stac-fastapi-pgstac is a FastAPI application that wraps PgSTAC, a PostgreSQL-backed STAC (SpatioTemporal Asset Catalog) database engine. It validates incoming HTTP requests against the STAC API specification, delegates search and retrieval operations to PgSTAC's procedural SQL functions, and enriches responses with standardized STAC links. The package stores all collection and item records as JSONB fields in PostgreSQL, preserving custom fields transparently.
The package is designed for deployments that need a standards-compliant HTTP interface to large geospatial metadata catalogs. It supports the STAC Sort Extension (with optimized datetime sorting), optional API-level or database-level result hydration, and the Multi-Tenant Catalogs Extension for hierarchical catalog structures with directed acyclic graph support. Runtime dependencies include asyncpg for async database access, pydantic for validation, and orjson for fast JSON serialization.
Use it for
- Expose a searchable STAC API endpoint over HTTP for a PostgreSQL-backed geospatial metadata catalog
- Build a multi-tenant geospatial data platform with hierarchical catalogs and poly-hierarchy link navigation
- Integrate STAC search into a larger FastAPI application using stac-fastapi-pgstac as a backend module
- Serve large spatiotemporal asset collections with optimized datetime-based sorting and filtering
- Deploy a STAC API with custom JSON fields preserved transparently through JSONB storage
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has low install friction, carries no known vulnerabilities, and is MIT-licensed. Install it if you need a production-ready STAC API server backed by PostgreSQL. Prerequisite: you must provision a PgSTAC database schema and have PostgreSQL with PostGIS available; the package itself is the HTTP layer, not a standalone database.
Install
stac-fastapi-pgstac on PyPI
Before you install
Low install friction with a pure-Python wheel. Active maintenance with a recent release 51 days ago and a commit history through August 2026. Requires 14 runtime dependencies including asyncpg, pydantic, and stac-fastapi ecosystem packages.
Requires a running PostgreSQL database with PgSTAC schema installed and pypgstac package available; Python >=3.11
License in practice
MIT license (permissive) allows commercial and private use with minimal restrictions, making it suitable for both open and proprietary deployments.
Quickstart
# Install
pip install stac-fastapi-pgstac
# Minimal usage (requires PgSTAC database configured)
from stac_fastapi_pgstac.app import StacApi
from stac_fastapi_pgstac.config import Settings
settings = Settings()
app = StacApi.build(settings=settings)
Verify before relying
- Whether PgSTAC database schema and pypgstac package are automatically provisioned or require separate setup
- Performance characteristics for repositories with millions of records beyond datetime sorting
- Whether Docker Compose is required for local development or if PostgreSQL/PostGIS can be configured standalone
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 14 packagesasyncpgattrsbrotli-asgibuildpgcql2hydratersjson-merge-patchjsonpatchorjsonpydantic-settingspydanticstac-fastapi-apistac-fastapi-extensionsstac-fastapi-types |
| Maintenance | Actively maintained 51 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 80,082 / month, #14,322 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.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: stac_fastapi_pgstac-6.3.1-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 api fastapi backend”
- stac-fastapi-pgstacProvides a FastAPI-based HTTP interface to PgSTAC, a PostgreSQL…
- stac-fastapi-apiProvides a FastAPI-based implementation of the STAC API…
- stac-fastapi-typesProvides core type definitions and data models for building STAC API…
Give your agent the search over MCP, or paste the wish link into any chat.
More Dynamic Content packages
MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.
Jinja2 is a templating engine that renders dynamic content by combining templates with Python-like syntax and data, supporting template inheritance, macros, autoescaping, and sandboxed execution.
Soupsieve is a CSS selector library designed to work with Beautiful Soup 4 to select, match, and filter HTML and XML elements using modern CSS selectors from CSS level 1 through CSS level 4 specifications.
Install it if you use Beautiful Soup for HTML or XML parsing and want modern CSS selector support.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
Flask is a lightweight WSGI web application framework for building web applications in Python, from simple single-page sites to complex multi-route applications.
Mako compiles Python-embedded templates into Python modules for fast rendering, supporting layout inheritance, custom functions, and direct Python expressions within template syntax.
See also pypgstac · stac-fastapi-api · stac-fastapi-extensions · stac-fastapi-types · stac-pydantic · pystac · pystac-core · pystac-client · pystac-ext-projection · planetary-computer