Skip to main content

Run CGI apps under Python WSGI protocol

Project description

Run CGI apps under Python WSGI protocol ([PEP 333](

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


>>> 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('', 8000, app)
>>> print "Serving on"
>>> httpd.serve_forever()

The WSGI application can be used with [any server supporting WGSI](


The module can be installed [from source]( using

python install

Alternativelly it can be installed with [pip](

pip install wsgi2cgi


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


Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
wsgi2cgi-0.1.tar.gz (4.1 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page