Implementing a REST server – WSGI and mod_wsgi
As REST is built on HTTP, a REST sever is an extension to an HTTP server. For robust, high-performance, secure operations, common practice is to build on a server such as Apache httpd or the nginx. These servers don't support Python by default; they require an extension module to interface with a Python application.
One widely used interface between web servers and Python is the WSGI. For more information, see http://www.wsgi.org. The Python Standard Library includes a WSGI reference implementation. See PEP 3333, http://www.python.org/dev/peps/pep-3333/, for the ways this reference implementation works in Python 3.
The idea behind WSGI is to standardize the HTTP request-reply processing around a relatively ...
Get Mastering Object-oriented Python now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.