wsgi_proxy — Python package of wsgi-proxy

This is an importable Python package that consists of basic WSGI app and other frontends around it. The most important thing for you is probably app and its type WSGIProxyApplication.

You can use this with other third-party WSGI servers. For example:

$ pip install gunicorn
$ gunicorn -p8080 wsgi_proxy:app
class wsgi_proxy.WSGIProxyApplication

WSGI application to handle requests that need to be proxied. You have to instantiate the class before using it as WSGI app:

from wsgiref.simple_server import make_server

app = WSGIProxyApplication()
make_server('', 8080, app).serve_forever()
handler(environ, start_response)

Proxy for requests to the actual http server


Returns True if the given header is hop by hop.

Parameters:header (basestring) – the header name
Returns:whether the given header is hop by hop or not
Return type:bool

Reconstruct the remote url from the given WSGI environ dictionary.

Parameters:environ (collections.MutableMapping) – the WSGI environment
Returns:the remote url to proxy
Return type:basestring

wsgi_proxy.cliwsgi-proxy command

-h, --help

Print help message.

-p <port>, --port <port>

The port number to listen. Default is 8080.

-H <host>, --host <host>

The hostname to listen. Default is

--server <server>

The WSGI server implementation to use. Default is waitress.

-v, --verbose

Print debug logs as well. It internally sets logging level to DEBUG.

-q, --quiet

Operate quitely. It internally sets logging level to ERROR.

wsgi_proxy.version — Version data