Boilerplate for Python Dash Projects

Hi all,

I have always had difficulties in starting a product-ready dash project.
So, I created a boilerplate inspired by toddbirchard.

I made some changes that were crucial to make it useful. The main features are:

  • venv is used as virtual environment.
  • a simple .env is used as the main dotfile.
  • flake8 is used for style guide enforcement.
  • pylint is used for static code analysis.
  • uWSGI is used as web server gateway interface.
  • Makefile and deploy.sh are written to make it product-ready.
  • pytest and pytest-cov are used for unit testing and coverage reports.
  • .editorconfig was used to configure and enforce formatting and code style conventions.
  • .vscode settings.json is used to configure Visual Studio Code.
  • It works well with callbacks (callback issue of the plotlydash-flask-tutorial is resolved).
  • UI boilerplate like jinja2 and less are removed.

Hope that you like it!

1 Like

Update:

dash-boilerplate has been updated!

  • it is now dockerized, and more product-ready,
  • separate development and production docker containers,
  • packaging managed by poetry,
  • docstring tested with interrogate, pydocstyle, and darglint,
  • badge for coverage of the unit tests,
  • radon maintainability and complexity scores are reported with badges,
  • security issues and vulnerabilities checked by bandit and safety,
  • codestyle checked with black and isort,
  • mypy used for static type analysis
  • CI by github actions.
  • pre-commits enabled

Hope that you will find it useful!

3 Likes