A boilerplate project with a few models to use when bootstrapping new Python 3 projects with FastApi.
- Test automation and environment provisioning using Tox
- Static code analysis using Flake8
- Unit testing using pytest
- Enforced code coverage threshold using coverage
- Dependencies pinned to the major version, allowing for backwards-compatible updates when upstream
- Licensed under CC0 Public Domain Dedication
You can copy/paste anything and not worry about a thing, not even giving original authors attribution.
- "Account", a given customer account (a company), has a unique ID and a name
- "Mall", a given shopping mall, has a unique ID, a name and a foreign key to a given Account
- "Unit", a given store inside a shopping mall, has a unique ID, a name and a foreign key to a given Mall
The current version is using a SQLite database (see .env file) and a very basic ORM.
uvicorn api.main:app --reload
You will see the automatic interactive API documentation (provided by Swagger UI) here : Interactive API docs
You will see the alternative automatic documentation (provided by ReDoc) here : Interactive API docs - Redoc
tox
OR
coverage run -m pytest
coverage report
coverage html
The github workflows can be found in the .github
folder