A Simple Dashboard in Flask

The Flask python library can help create quick and minimalist dashboards. In this project, I created a mini-dashboard with a mix of Python, SQL and Flask to help me visualise smartwear data. This is the result:

Project structure

The project layers are as follows:

  • Fitbit API wrapper: A python class that handles interactions with the Fitbit REST API, dealing with the token authentication/refresh process.

  • Database: A MySQL database holding the Fitbit API authentication credentials, as well as tables of fitness data (continuously updated).

  • Server: A python class that handles communicating with the Database, and fetching/updating Fitbit API credentials.

  • Plotting module: Creates plots from database tables.

  • Flask app: Serve in a beautiful webpage and voilà!

See the project code in the GitHub repository.