Choose local path in dashboard

You could initiate your app with command line arguments. One of those arguments could be the path you are referring to.

EDIT: Actually I’m not sure if this works :slight_smile:

What I did in the past is creating a config.py file which I import in the app.py.

something like this:

config.py:

my_path = '...'

app.py

import dash 
import config

path_to_use = config.my_path

app = dash.Dash(__name__)
app.layout = html.Div(path_to_use)

app.run()
2 Likes