I am using a Python shell to interactively run simulations and write data to a file. I have a dash app which renders a bunch of interactive plots from this data. I’d like the dash app to show new data after each run.
Dash’s Live Updating Components page gives two options:
- Create a
dcc.Intervalon the client and have it poll for changed data
app.layout = serve_layoutto force a page reload to serve a new dynamic layout
The first seems a bit loose (but I guess the check for new data could be kept light) and the second requires the user to hit reload.
So, is there a way for my python process to tell the dash server to trigger a reload? Or some other approach I’ve missed?