/Dash-User-Management

A template Plotly Dash app in Python, with basic user management & authentication

Primary LanguageCSSMIT LicenseMIT

Dash-User-Management

A template web app built in Plotly Dash for Python, which handles user creation, user authentication/login, user permissions (admin/non admin), and page navigation. This web app is a great starting point for developing a custom cloud based dashboard where the user base is relatively small e.g. accessible by team members or small organisations.

Example of app in action with a demo layout on page 1:

The template uses Dash bootstrap components with the Flatly bootswatch theme - https://bootswatch.com/flatly/

The template has the following views:

  1. login.py - User login page, displayed if a user tries to access any page and is not currently logged in
  2. page1.py - Empty template page for your own Dash layout
  3. page2.py - Another empty template page
  4. profile.py - For users to update their own password
  5. user_admin.py - A page for admin users only, with ability to create new users and view existing users
  6. 404.py - Simple 404 error message to catch requests for non-existent pages

Database Setup

Default database setup is MySQL and the required table can be setup using the table_create_statement in /db.

The database username, password, and database_name need be updated in the con parameter of config.txt to the correct details for your database.

Other databases can be used - refer to SQLAlchemy for required connection statement and update the con parameter of config.txt.