Skip to content

Home

FastAPI implemention of the STAC API spec.

Test Package version License


Documentation: https://stac-utils.github.io/stac-fastapi/

Source Code: stac-utils/stac-fastapi


Python library for building a STAC compliant FastAPI application. The project is split up into several namespace packages:

  • stac_fastapi.api: An API layer which enforces the stac-api-spec.
  • stac_fastapi.extensions: Abstract base classes for STAC API extensions and third-party extensions.
  • stac_fastapi.types: Shared types and abstract base classes used by the library.

Backends

Backends are hosted in their own repositories:

stac-fastapi was initially developed by arturo-ai.

Installation

# Install from PyPI
python -m pip install stac-fastapi.types stac-fastapi.api stac-fastapi.extensions

# Install a backend of your choice
python -m pip install stac-fastapi.sqlalchemy
# or
python -m pip install stac-fastapi.pgstac

Other backends may be available from other sources, search PyPI for more.

Development

Install the packages in editable mode:

python -m pip install -e \
  'stac_fastapi/types[dev]' \
  'stac_fastapi/api[dev]' \
  'stac_fastapi/extensions[dev]'

To run the tests:

python -m pytest