a dash extension for multipage apps
Project description
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
Release history Release notifications | RSS feed
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
File details
Details for the file dash_multi-0.1-py3-none-any.whl
.
File metadata
- Download URL: dash_multi-0.1-py3-none-any.whl
- Upload date:
- Size: 4.5 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.31.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef53e666e2a105d497f23e14e72a43f98b6c9f3662062c94ed57158580189141 |
|
MD5 | ad7a742a102305acd4712bb7e509b55c |
|
BLAKE2b-256 | 21a12a3b7863d42d0c92d3b6fac4e8aaf1278ccfd14edd94f11a5a95bc97f1d5 |