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 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.

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 ./bin/server.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 server:app --app-dir ./bin --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.1.0a0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

stapi_fastapi-0.1.0a0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file stapi_fastapi-0.1.0a0.tar.gz.

File metadata

  • Download URL: stapi_fastapi-0.1.0a0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for stapi_fastapi-0.1.0a0.tar.gz
Algorithm Hash digest
SHA256 dfa789647f97816c125e8deeb6bc42a5b0c8b4df3a6d7969989049f35e30d69f
MD5 646510ecd428f0112455f9790908bb24
BLAKE2b-256 029bbfd105b19316b00e0c6254eb5b05fa0d08f465f3055d6540308aae42c5d3

See more details on using hashes here.

Provenance

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

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

Attestations:

File details

Details for the file stapi_fastapi-0.1.0a0-py3-none-any.whl.

File metadata

File hashes

Hashes for stapi_fastapi-0.1.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d363d2951e43348820ab54c111687005f1aef2b0f46306052a043a681a78aab
MD5 fd56d03f73bd07794bdea309a026fd6b
BLAKE2b-256 cd0ad1fca83c0d4263963c8747da413c742172a1b72e331e9c99f5e596a77b50

See more details on using hashes here.

Provenance

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

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

Attestations:

Supported by

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