Skip to main content

a dash extension for multipage apps

Project description

Build Status Documentation Status Downloads

Dash Multi(Page)

Wrapper on top of Dash to support multi page apps.

Running Examples

Run one of:

  • index.py
  • standalone_page.py
  • standalone_section.py

Illustrative Example

Create a multipage app

app = MultiPageApp(__name__)

# Configure routing
routes = [
    Route('', IndexPage()),             
    Route('/page1', Page1()),           
    Route('/page2', section2_routes),   # Section containing pages and further sections
]

app.set_routes(routes)

if __name__ == '__main__':
    app.run_server(debug=True)

Create a single page app (@alexcjohnson style):

app = MultiPageApp(__name__)

page = Page()
page.layout = html.Div(header.children + [
        html.H3('Home'),
        dcc.Interval(id='interval-component', interval=1*1000, n_intervals=0),
        html.Div(id='display-value'),
    ])

@page.callback(Output('display-value', 'children'), [Input('interval-component', 'n_intervals')])
def my_callback(n_intervals):
    return f"Seconds since load: {n_intervals}."

# This will serve the page at "/"
app.set_routes(page)

if __name__ == '__main__':
    app.run_server(debug=True)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

dash_multi-0.2-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page