The Web Server Gateway Interface (WSGI) defines a relatively simple, standardized design pattern for creating a response to a web request. This is a common framework for most Python-based web servers. A great deal of information is present at the following link: http://wsgi.readthedocs.org/en/latest/.
Some important background of WSGI can be found at https://www.python.org/dev/peps/pep-0333.
The Python library's wsgiref package includes a reference implementation of WSGI. Each WSGI application has the same interface, as shown here:
def some_app(environ, start_response): return content
The environ parameter is a dictionary that contains all of the arguments of the request in a single, uniform structure. The headers, the request method, the path, and any attachments for forms or file uploads will all be in the environment. In...