skip to navigation
skip to content

WSGIProxy2 0.4.2


With pip:

$ pip install WSGIProxy2

Install optionnal backends:

$ pip install requests restkit urllib3


Create a proxy:

>>> from wsgiproxy import HostProxy
>>> proxy = HostProxy(application_url)

Then use it. Here is an example with WebOb but you can use it like a classic WSGI application:

>>> from webob import Request
>>> req = Request.blank('/form.html')
>>> resp = req.get_response(proxy)
>>> print(resp.text)

The Proxy application accept some keyword arguments. Those arguments are passed to the client during the process.

If no client as specified then python httplib is used. It’s recommended to use a more robust client able to manage a connection pool and stuff.

Use urllib3:

>>> proxy = HostProxy(application_url, client='urllib3')

Use requests. This client support response streaming:

>>> proxy = HostProxy(application_url, client='requests')

Use restkit. This client support request and response streaming but does not support python3 (will be fixed with the next release):

>>> proxy = HostProxy(application_url, client='restkit') # doctest: +SKIP


0.4.2 (2014-12-20)

  • Undo webob’s unquoting to handle paths with percent quoted utf8 characters [Laurence Rowe]

0.4.1 (2013-12-21)

  • Include in release

0.4 (2013-12-21)

  • fix tests.
  • change the way requests iter response

0.3 (2013-09-12)

Make allowed_methods check optional


Return the data not gzip decoded when using request


Initial release

File Type Py Version Uploaded on Size (md5) Source 2014-12-20 18KB
  • Downloads (All Versions):
  • 104 downloads in the last day
  • 412 downloads in the last week
  • 1932 downloads in the last month