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).
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 CGI class supports two arguments:
command: absolute path to the CGI application executable.
extra_env: additional environment variables.
The WSGI application can be used with any server supporting WSGI.
More information:
WSGI Servers: http://wsgi.readthedocs.org/en/latest/servers.html
Install
The module can be installed using setup.py:
python setup.py install
Alternativelly it can be installed with pip:
pip install wsgi2cgi
License
This package is open source under the MIT license terms. Check COPYING file for further details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file wsgi2cgi-0.2.1.tar.gz.
File metadata
- Download URL: wsgi2cgi-0.2.1.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50e8a780a841200ae4e715003bfc69440e4f902a9ca076c651cee30e0cc812a6
|
|
| MD5 |
901352529f8013fad79298a2522856dc
|
|
| BLAKE2b-256 |
a7d74ebd69bc58f5311fc3b4d64854c01d08ae654155247bdf17489e475a8371
|