Update CSV From A Different Script

I have a python script which is constantly inserting data into data.csv
And then a dash file which reads data.csv after every one second and updates the graph.
This works fine when I run these two files on two separate terminals
How can I make it work in one file only? @chriddyp
When i combine the code the data insertion process does not start. It is somehow blocked by run_server() . However, when I press Ctrl+C the data insertion process begins. I need both the processes to run simultaneously to plot a dynamic graph on dynamic data

Have you realized the function? I have met the same issue as you. Wondering is ther any way to solve it?

For anyone passing by… I managed to get plotly to plot dynamically from a text file, and I can control the refresh rate based on a dcc.Interval. Check How to integrate dash with another process that might be blocking - #2 by chriddyp