Web Server Gateway Interface: Difference between revisions

Content deleted Content added
Rshin (talk | contribs)
No edit summary
Line 3:
The Web Server Gateway Interface. It defines a simple and universal interface between web servers and web applications or frameworks for the [[Python programming language]].
 
==Idea==
Python currently boasts a wide variety of web application frameworks. This can be a problem for new Python users, because generally speaking, their choice of web framework will limit their choice of usable web servers, and vice versa.
 
WSGI proposes a simple and universal interface between web servers and web applications or frameworks.
 
==Specification Overview==
The WSGI interface has two sides: the "server" or "gateway" side, and the "application" or "framework" side. The server side invokes a callable object that is provided by the application side. Additionally WSGI provides middlewares, components that play both sides.
 
Line 17:
* Perform content postprocessing, such as applying XSL stylesheets
 
==Example Application==
A WSGI compatible "[[Hello World]]" application:
<pre>
Line 25:
</pre>
 
==WSGI compatible Applications and Frameworks==
There are numerous [[Web application framework]]s supporting WSGI:
* [[Django web framework|Django]]
Line 35:
* [http://wsgiarea.pocoo.org/colubrid/ Colubrid]
 
==Wrappers==
The server or gateway invokes the application callable once for each request it receives from an HTTP client, that is directed at the application.