Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Run CGI apps under Python WSGI protocol

Project Description

Run CGI apps under Python WSGI protocol ([PEP 333][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 WSGI][WSGI Servers].

[PEP-333]: [WSGI Servers]:


The module can be installed [from source][source code] using

python install

Alternativelly it can be installed with pip:

pip install wsgi2cgi

[source code]:


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


Release History

History Node


This version
History Node


History Node


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
(4.2 kB) Copy SHA256 Hash SHA256
Source None Apr 28, 2012

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting