app_setup module¶
- app_setup(port, service_prefix, domain, stylesheet)¶
Set up and configure a Dash application with the specified parameters.
- Parameters:
port (int) – The port number for the Dash application.
service_prefix (str) – The service prefix used for constructing the app’s pathname.
domain (str) – The domain name where the app is hosted.
stylesheet (str) – The name of the Bootstrap theme to apply to the app. Must be a key in theme_map.
- Returns:
Configured Dash application instance.
- Return type:
Dash
Notes
The function maps the stylesheet parameter to a Bootstrap theme using theme_map.
A callback is registered within the app to toggle the visibility of an element with the ID main-varvelger based on the number of clicks on sidebar-varvelger-button.
Examples
>>> app = app_setup(port=8050, service_prefix="/", domain="localhost", stylesheet="slate") >>> app.run_server()