Skip to main content

Spatio Temporal Asset Tasking with FastAPI

Project description

STAPI FastAPI - Sensor Tasking API with FastAPI

WARNING: The whole STAPI spec is very much a work in progress, so things are guaranteed to be not correct.

Usage

STAPI FastAPI provides an fastapi.APIRouter which must be included in fastapi.FastAPI instance.

ADRs

ADRs can be found in in the adrs directory.

Development

It's 2024 and we still need to pick our poison for a 2024 dependency management solution. This project picks poetry for now.

Dev Setup

Setup is managed with poetry and pre-commit. It's recommended to install the project into a virtual environment. Bootstrapping a development environment could look something like this:

python -m venv .venv
source .venv/bin/activate
pip install poetry  # if not already installed to the system
poetry install --with dev
pre-commit install

Test Suite

A pytest based test suite is provided, and can be run simply using the command pytest.

Dev Server

This project cannot be run on its own because it does not have any backend implementations. However, a minimal test implementation is provided in ./tests/application.py. It can be run with uvicorn as a way to interact with the API and to view the OpenAPI documentation. Run it like so from the project root:

uvicorn application:app --app-dir ./tests --reload

With the uvicorn defaults the app should be accessible at http://localhost:8000.

Implementing a backend

  • The test suite assumes the backend can be instantiated without any parameters required by the constructor.

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

stapi_fastapi-0.4.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

stapi_fastapi-0.4.0-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file stapi_fastapi-0.4.0.tar.gz.

File metadata

  • Download URL: stapi_fastapi-0.4.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for stapi_fastapi-0.4.0.tar.gz
Algorithm Hash digest
SHA256 a32ea4296dfe2821695d795d07cda7834262acdef774655da6708dc2a1e9507f
MD5 93accd5af1113b8b2fba6b7f0852dceb
BLAKE2b-256 a3df7cbd0787a90d50364055df5d89bc9c1c87b637ed476f9663cef1cda5c981

See more details on using hashes here.

Provenance

The following attestation bundles were made for stapi_fastapi-0.4.0.tar.gz:

Publisher: python-publish.yml on stapi-spec/stapi-fastapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file stapi_fastapi-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: stapi_fastapi-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for stapi_fastapi-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d29b0cf7bd4c6f3e1b4b97ba0a62ee0570ad27b835aa2373448d484d67cbeca
MD5 cbb0c0d1cc42be89fae4ea9906ace89b
BLAKE2b-256 d4fb511e3ec1a721c4f65458d2bc9ca87b827731cde526d8a581ecf91f7399a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for stapi_fastapi-0.4.0-py3-none-any.whl:

Publisher: python-publish.yml on stapi-spec/stapi-fastapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page