All of the API calls are commented redoc style in the code.
When running with the DEBUG flag, redoc is available at the /docs
endpoint.
The project is checked with the following tools:
- Coding style: Black
- Type checking: Mypy
- Linting: Flake8
- Testing: Pytest
- Coverage: pytest-cov
The project is managed using Poetry. The environment variables are managed via poetry using poetry-dotenv-plugin.
There are 3 specific environment flags that are configured in the pyproject.toml
file:
- default: all packages necessary to run the code in production
- dev: all packages necessary to run the code in development with the checks
- test: all packages necessary to run the tests and coverage
There are 2 dotenv files that are supplied:
.env
for development.env.production
for production (with recommended settings)
After enabling your virtual environment, run the following command:
pip install poetry
poetry install --with test --with dev
Then run the following command:
poetry run pytest