FastApi implementation conforming to the OpenEO Api specification.
Project description
OpenEO FastAPI
A FastAPI implementation of the OpenEO Api specification.
Install
Install using pip
pip install openeo-fastapi
Use
The openeo fastapi repo has been set up to work with alembic. When you use this package to to prepare your api, you will need to create an alembic directory. In this directory, you can optionally add a models.py file and extend and of the models from openeo_fastapi.client.models.
The env.py file in the alembic directory, needs to be edited in the following way.
from openeo_fastapi.settings import BASE
target_metadata = BASE.metadata
You can now create auto revisions for a psql database using the alembic python commands.
alembic_cfg = Config("alembic.ini")
command.revision(alembic_cfg, f"openeo-fastapi-{__version__}", autogenerate=True)
command.upgrade(alembic_cfg, "head")
engine = get_engine()
Check how it is configured for the tests to see more.
Contribute
Included is a vscode dev container which is intended to be used as the development environment for this package. A virtual environment needs to be set up inside the dev container, this is managed by poetry.
Setup
-
In VSCode
Ctrl + shift + p
and select "Dev Containers: Rebuild Container" to open the development environment for the first time. -
Once the development environment is ready, run the following commands.
# From /openeo-fastapi poetry config virtualenvs.path "<I tend to set this to the repo. I.e, ~/openeo-fastapi/.venv>" poetry lock poetry install --all-extras poetry run pre-commit install
If you want to add a new dependency. Add it to the pyproject.toml and rerun the two commands again.
Git is available in the container, so you can commit and push directy to your development branch.
-
You are now ready to write code and run tests!
Either
poetry run python -m pytest
Or, run them directly from the testing section of vscode.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file openeo_fastapi-2024.11.2.tar.gz
.
File metadata
- Download URL: openeo_fastapi-2024.11.2.tar.gz
- Upload date:
- Size: 35.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82a6d5d6d0d6dc9922e9e98be9d40ddcc30d9bf2fda24d8b5f5fdc3ca2d70b2f |
|
MD5 | 114d6857ec799cf39faf2db0102221b8 |
|
BLAKE2b-256 | ab1bb3b3b0bc655ff364ed63322bc209a329f62dcd4193608a1bd995d296eb0a |
Provenance
The following attestation bundles were made for openeo_fastapi-2024.11.2.tar.gz
:
Publisher:
release.yaml
on eodcgmbh/openeo-fastapi
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
openeo_fastapi-2024.11.2.tar.gz
- Subject digest:
82a6d5d6d0d6dc9922e9e98be9d40ddcc30d9bf2fda24d8b5f5fdc3ca2d70b2f
- Sigstore transparency entry: 149749883
- Sigstore integration time:
- Predicate type:
File details
Details for the file openeo_fastapi-2024.11.2-py3-none-any.whl
.
File metadata
- Download URL: openeo_fastapi-2024.11.2-py3-none-any.whl
- Upload date:
- Size: 44.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15add49133fa1ba534da9151930f486c0e397c4103bd6244a343c02734e84bc3 |
|
MD5 | ab897f511a67fa498ad8951a69055eb7 |
|
BLAKE2b-256 | f5c137ca8a78fa140f8762c1349b49b018f8494f2f2d56dc764044c0fa32a660 |
Provenance
The following attestation bundles were made for openeo_fastapi-2024.11.2-py3-none-any.whl
:
Publisher:
release.yaml
on eodcgmbh/openeo-fastapi
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
openeo_fastapi-2024.11.2-py3-none-any.whl
- Subject digest:
15add49133fa1ba534da9151930f486c0e397c4103bd6244a343c02734e84bc3
- Sigstore transparency entry: 149749886
- Sigstore integration time:
- Predicate type: