Is there a way to reload an entire Plotly Dash py script?

Viewed 398

I have deployed a plotly dash app to heroku which gets data from a few APIs then makes some plots

Is there a way to get the webpage to automatically refresh every ten minutes so it reloads completely with all the new data?

1 Answers

Ploty Dash has a feature set called dash_core_components.Interval which allows you to define components to update at set intervals.

https://dash.plotly.com/live-updates

Be aware that dash recommends implementing memoization, using a time expiring cache of sorts because 'each process or thread contains its own memory, it doesn't share memory across instances'

https://dash.plotly.com/performance

Related