October 2018
Intermediate to advanced
332 pages
8h 9m
English
Tornado is another very simple way to deploy WSGI apps purely with Python. Tornado is a web server that is designed to handle thousands of simultaneous connections. If your application needs real-time data, Tornado also supports WebSockets for continuous, long-lived connections to the server.
To use Tornado with our application, we will use Tornado's WSGIContainer in order to wrap the application object to make it Tornado-compatible. Then, Tornado will start to listen on port 80 for requests until the process is terminated. In a new file, named tserver.py, add the following: