Skip to content

moradology/stac-fastapi

 
 

Repository files navigation

FastAPI implemention of the STAC API spec.

Test Package version Downloads


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.

Installation

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

Local Development

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

Testing

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

About

STAC API implementation with FastAPI.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 97.7%
  • Other 2.3%