Mongodb stac-fastapi backend.
Project description
stac-fastapi-mongo
Mongo backend for the stac-fastapi project built on top of the sfeos core api library.
To install from PyPI:
pip install stac_fastapi.mongo
For changes, see the Changelog
Development Environment Setup
To install the classes in your local Python env, run:
pip install -e .[dev]
Pre-commit
Install pre-commit.
Prior to commit, run:
pre-commit run --all-files
Build stac-fastapi.mongo backend
docker-compose up mongo
docker-compose build app-mongo
Running Mongo API on localhost:8084
docker-compose up app-mongo
To create a new Collection:
curl -X "POST" "http://localhost:8084/collections" \
-H 'Content-Type: application/json; charset=utf-8' \
-d $'{
"id": "my_collection"
}'
Note: this "Collections Transaction" behavior is not part of the STAC API, but may be soon.
Collection pagination
The collections route handles optional limit
and token
parameters. The links
field that is
returned from the /collections
route contains a next
link with the token that can be used to
get the next page of results.
curl -X "GET" "http://localhost:8084/collections?limit=1&token=example_token"
Testing
make test
Ingest sample data
make ingest
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
stac_fastapi_mongo-3.0.1.tar.gz
(15.4 kB
view hashes)
Built Distribution
Close
Hashes for stac_fastapi.mongo-3.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b84ed5c73f2c41aaf1bec51ef6742a5000e35c57ec56c09de481a7eb5edb04d9 |
|
MD5 | fc8778d0bf3105d93a24e546ac17a0d8 |
|
BLAKE2b-256 | aaf5465927c74d2ab1d0c4967a5649c7d16b88a457d7f4072c0772306f663d8d |