Skip to main content

Installation

With pip:

$ pip install WSGIProxy2

Install optionnal backends:

$ pip install requests urllib3

Usage

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)
<html>...
...</html>

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')

Changes

0.5.0 (2021-08-18)

  • Drop support for python3.6 and bellow

0.4.6 (2019-02-22)

  • PATCH added into (default) list of allowed methods

0.4.5 (2018-09-19)

  • Allow to use URIs with no path

0.4.4 (2017-06-02)

  • Clean up connection before returning result. This removes some ResourceWarnings when testing

0.4.3 (2017-02-17)

  • Add OPTIONS to defaults allowed methods

  • Drop restkit support

  • Drop py26 support

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 README_fixt.py 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

0.2

Return the data not gzip decoded when using request

0.1

Initial release

Metadata

Release files for WSGIProxy2 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for WSGIProxy2 0.5.0
File Size Uploaded Provenance Actions
WSGIProxy2-0.5.0.tar.gz 16.5 kB Without provenance Details for WSGIProxy2-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for WSGIProxy2 0.5.0
File Interpreter ABI Platform Actions
WSGIProxy2-0.5.0-py3-none-any.whl Python 3 none any Details for WSGIProxy2-0.5.0-py3-none-any.whl

Total release size: 25.6 kB

Release files / WSGIProxy2-0.5.0.tar.gz

Download URL WSGIProxy2-0.5.0.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
aa6c2e9c470f5045c900bc965c097ca2ef0e76a16e361e2149340b2030c29d37
BLAKE2b-256 checksum
How to use checksums
020e24011d49d54d488d473b2ac84b9761f2a9808ff568f1c9619b19da7fa252
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.14.0 pkginfo/1.4.2 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

Release files / WSGIProxy2-0.5.0-py3-none-any.whl

Download URL WSGIProxy2-0.5.0-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9bac760e60583905e5bd938903491f3a1a6fca95c810e0032bf7d94afb29f525
BLAKE2b-256 checksum
How to use checksums
2ffa447606c2e88e91e085e9a72d942599e53abeb15ebb71ba5a26304586d62d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.14.0 pkginfo/1.4.2 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

Security for WSGIProxy2 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page