Plotly Dash

How to Structure a Multi Page Dash App

Weave together multiple Dash apps once you know how to build them.

Peter Haas
5 min readJun 28, 2021

--

Photo by ALAN DE LA CRUZ on Unsplash

Have you started creating web applications with Dash? Do you have two or more that you need to put together into one site with separate pages?

Once you are competent in assembling Dash layouts and callbacks into a basic Dash application, you’ll probably want to build a site with multiple pages that handle different kinds of data and displays.

It’s not a complicated process, but there are a few key things that you need to do.

Below is a basic multi-page Dash application. It’s adapted from the Multi-Page Apps and URL Support page at Plotly Dash.

Organize Your Directory and Set Up the Essential Files

Here is the directory structure:

- index.py 
- app.py
- run.py
- pages
|-- page_1.py
|-- page_2.py
  • index.py — To increase navigation speed, Dash renders web applications as a “single page app”. This means that the browser does not completely…

--

--

Peter Haas
Peter Haas

Written by Peter Haas

Python Data Analyst. Writing about Python programming, data analysis, data visualization, and whatever I’m interested in at the moment.

Responses (1)