This project bootstraps a template to create toy Python API.
- Docker
- Python > 3.10
- Poetry as dependency management tool. If you need to change some library version from pyproject.toml, run
poetry lock.
Then run poetry env info -p to make sure the environment setup was done properly.
- For every change in the
pyproject.tomlrunpoetry.lock - Run
poetry installto install the dependencies to a new environment - Run
source $(poetry env info --path)/bin/activateto activate the poetry environment (Tested on MacOS)
make format_code: rewrites source code using black and isort to keep it in the standard formatmake lint: checks the source code for syntax violationsmake test: Run unit testsmake run: FastAPI will be up at http://localhost:8000/
- The project OpenAPI is available at http://localhost:8000/docs
- Further documentation can be placed in the docs folder.