WARNING: The whole STAPI spec is very much work in progress, so things are guaranteed to be not correct.
STAPI FastAPI provides an fastapi.APIRouter
which must be included in
fastapi.FastAPI
instance.
It's 2024 and we still need to pick our poison for a 2024 dependency management solution. This project picks poetry for now.
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
A pytest
based test suite is provided, and can be run simply using the
command pytest
.
This project cannot be run on its own because it does not have any backend implementations. If a development server is desired, run one of the implementations such as stapi-fastapi-tle. To test something like stapi-fastapi-tle with your development version of stapi-fastapi, install them both into the same virtual environment.
- The test suite assumes the backend can be instantiated without any parameters required by the constructor.