Skip to main content

Run CGI apps under Python WSGI protocol

Project description

Run CGI apps under Python WSGI protocol ([PEP 333](http://www.python.org/dev/peps/pep-0333/)).

This is a simple WSGI application that executes an external process and translates the WSGI protocol to the Common Gateway Interface (CGI).

Example:

>>> from wsgiref.simple_server import make_server
>>> import wsgi2cgi
>>> def app(environ, start_response):
>>>    wapp = wsgi2cgi.CGI('/path/to/executable.cgi')
>>>    return wapp.application(environ, start_response)
>>> httpd = make_server('127.0.0.1', 8000, app)
>>> print "Serving on 127.0.0.1:8000..."
>>> httpd.serve_forever()

The WSGI application can be used with [any server supporting WGSI](http://wsgi.readthedocs.org/en/latest/servers.html).

Install

The module can be installed [from source](https://github.com/reidrac/wsgi2cgi) using setup.py:

python setup.py install

Alternativelly it can be installed with [pip](http://pypi.python.org/pypi/pip):

pip install wsgi2cgi

License

This package is open source under the MIT license terms. Check COPYING file for further details.

Author

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wsgi2cgi-0.1.tar.gz (4.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page