FastAPI implemention of the STAC API spec.
Documentation: https://stac-utils.github.io/stac-fastapi/
Source Code: https://github.com/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.server: Standalone FastAPI server for the application.
- stac_fastapi.sqlalchemy: Postgres backend implementation with sqlalchemy.
- stac_fastapi.types: Shared types and abstract base classes used by the library.
stac-fastapi
was initially developed by arturo-ai.
pip install stac-fastapi
# or from sources
git clone https://github.com/stac-utils/stac-fastapi.git
cd stac-fastapi
pip install -e \
stac_fastapi/api \
stac_fastapi/types \
stac_fastapi/extensions \
stac_fastapi/sqlalchemy
Use docker-compose to deploy the application, migrate the database, and ingest some example data:
docker-compose build
docker-compose up
For local development it is often more convenient to run the application outside of docker-compose:
make docker-run
The database container provided by the docker-compose stack must be running. Run all tests:
make test
Run individual tests by running pytest within the docker container:
make docker-shell
$ pytest -v