The boilerplate for the project using restful Flask-RESTX framework
- The entry point of the code
- Store configuration from env variables
Flask-RESTX provides a way to use Flask’s blueprint. The main idea is to split your app into reusable namespaces. Here namespaces are organized in different modules
-
/app/modules/sample_mod: each module is split into MVC, i.e. controller, dto, view
- /app/modules/sample_controller.py
- /app/modules/sample_dto.py
- /app/modules/sample_view.py
-
/app/modules/sample_mod/datadef: validation layer
we put everything else here, i.e. interfaces, cache, databases, ORM, i18n, monitor, logging, etc.
- All related docker files
- sql migration files
- unit test directory
- Store documents files
$ docker build -f ./docker/app/Dockerfile .
$ docker run <name of image> -p 5000:5000
- Swagger is at /api/v1/openapi
$ pytest tests
$ pylint ./app
$ mypy ./app
$ black ./app
$ flake ./app
We use SemVer for versioning. Please see CHANGELOG.md for more details.
Please follow our contribution convention at contribution instructions and code of conduct.
To set up development environment, simply run:
$ pip install -r requirements.txt
You can also put a vote to get the project more visible to others.
If you like this project, you can buy buy me a pizza to motivate me improve on the project.