Run a script in background in flask
You can render a simple html file at your default route that make an Ajax request to a specific route which will start your script and when the script is finished return the data and catch them in your ajax request to display the data on your page. During the process of your script you can display a loader to show that something is happening
I am writing an app using Flask that runs a shell script and displays its output in a web page. This works fine. The thing is when I run the script, it takes a long time and the page is loading during the whole time that the script is executed. What I want is that the script runs in the background and when it ends it displays the result. 
Is there a way to do that?