This project is a base template for creating a FastAPI application with poetry.
A basic configuration for tools like mypy, flake8, bandit, isort, and black is set.
Dependencies for testing are included.
Paketo buildpack is able to containerize the application from the pyproject.toml file:
pack build my-app --buildpack paketo-buildpacks/python --builder paketobuildpacks/builder:base
After creating the image, the application runs with:
docker run --rm -p 8000:8000 my-app
-
Get version from pyproject.toml instead of hardcoding it in app.__init__.py.
-
Set the configuration of flake8 in pyproject.toml when the tool supports it.