Pushing updates from Python server to web interface

I wrote an algorithm in python and a web interface around this. After you submit the form and run the algorithm, I would like to push and refresh the data on the page as it runs. How can i do this?

+3


source to share


1 answer


The following options are available for real-time or semi-real-time data exchange between web pages:



All approaches except the first require rudimentary JavaScript skills other than server-side knowledge of Python. The last two approaches recommend an in-depth understanding of real-time communications. Thus, if you are not familiar with web development, I recommend choosing the update meta tag.

On the server side, you need to start a process or thread that will handle the long running process and then process that process in the database. When the web UI refreshes, it reads the latest results from the database and pushes / returns them to the browser.

+1


source







All Articles