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 details)

Uploaded Python 3

File details

Details for the file dash_multi-0.2-py3-none-any.whl.

File metadata

  • Download URL: dash_multi-0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for dash_multi-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2f2b9c35ca869f96775684c426530a56da56ed9deef52a5c3955e9d97daaa31c
MD5 af8b1370df864ae294278967fd1fff46
BLAKE2b-256 7dd3a96c22b130122fddb2e6a475bdf3535c18cbb0f826c17fc465a97a7548e6

See more details on using hashes here.

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