Thanks to visit codestin.com
Credit goes to github.com

Skip to content

stac-utils/stac-fastapi-sqlalchemy

 
 

Repository files navigation

FastAPI implemention of the STAC API spec.

Test Package version License


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

Source Code: https://github.com/stac-utils/stac-fastapi-sqlalchemy


Sqlalchemy/postgis backend for stac-fastapi.

Installation

pip install stac-fastapi.sqlalchey

Local Development

Use docker-compose via make to start the application, migrate the database, and ingest some example data:

make image
make docker-run-all

By default, the apps are run with uvicorn hot-reloading enabled. This can be turned off by changing the value of the RELOAD env var in docker-compose.yml to false.

Note to Docker for Windows users

You'll need to enable experimental features on Docker for Windows in order to run the docker-compose, due to the "--platform" flag that is required to allow the project to run on some Apple architectures. To do this, open Docker Desktop, go to settings, select "Docker Engine", and modify the configuration JSON to have "experimental": true.

Testing

Before running the tests, ensure the database and apps run with docker-compose are down:

docker-compose down

The database container provided by the docker-compose stack must be running. This can be started with:

make run-database

To run tests for both the pgstac and sqlalchemy backends, execute:

make test

Run individual tests by running pytest within a docker container:

make docker-shell
pytest -v tests/api/test_api::test_app_search_response

About

PostgreSQL backend for stac-fastapi using SQLAlchemy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 36

Languages