Python and the Web
Using some of the techniques discussed in this book, in particular Chapter 8, Client and Server Applications, it is possible to use Python to write a full web server that handles all four of the steps of handling an HTTP request that we listed in the previous section. There are several actively developed web servers already in existence written in pure Python, including Gunicorn (http://gunicorn.org), and CherryPy (http://www.cherrypy.org). There is even a very basic HTTP server in the standard library http.server module.
Writing a full HTTP server is not a trivial task and a detailed treatment is well beyond the scope of this book. It is also not a very common requirement nowadays, primarily due to the prevalence of excellent ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access