Web Server Gateway Interface (WSGI) is defined in a Python Enhancement Proposal (PEP-333) written by Phillip J. Eby to provide a loosely-coupled bridge between the web server and web applications.
WSGI defines the following three components:
The following figure shows WSGI along with its layers:
The goal of WSGI is to allow components to be plugged and played at will, with the minimum API overhead possible. This allows code reuse of common functionalities such as session, authentication, URL dispatching, logging, etc. In fact, because the API is minimal and unobtrusive, frameworks or libraries supporting the WSGI specification will be able to handle these components.
Until CherryPy 3.0, the support of WSGI within CherryPy was not welcome due to the internal design of CherryPy and also the belief that WSGI would not necessarily make the product a better one. When Robert Brewer undertook the refactoring of the project, he improved...