Installation
With pip:
$ pip install WSGIProxy2
Install optionnal backends:
$ pip install requests restkit 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')
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
Changes
0.1
Initial release
Metadata
Release files for WSGIProxy2 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| WSGIProxy2-0.1.tar.gz | 6.5 kB | Without provenance | Details for WSGIProxy2-0.1.tar.gz |
Release files / WSGIProxy2-0.1.tar.gz
| Download URL | WSGIProxy2-0.1.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1162147455aa0b2f9a83b0ba4c3f48840f8329d090647426f994bb790f9e5763
|
|
BLAKE2b-256 checksum How to use checksums |
613f09005a96f3926321e5b6b3eb3d6363bdff55c4872a1b44a2c5d774de6fa5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for WSGIProxy2 0.1
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.