Requests Proxy Adapter
Set of Proxy Transport Adapters for Requests.
Free software: MIT license
Documentation: https://requests-proxy-adapter.readthedocs.io.
Features
PrivoxyAdapter – The transport adapter for Requests to use Privoxy proxy-server with retries when backend errors occurred.
RetryPrivoxyAdapter – The transport adapter for Requests to use Privoxy proxy-server with retries when backend errors occurred and retries if errors occured on target site by urllib3.util.retry module.
Usage
The simple exmaple of usage adapters (Privoxy run locally on 8118 port):
>>> import requests
>>> from requests_proxy_adapter import PrivoxyAdapter
>>> r = requests.get('http://httpbin.org/ip')
>>> public_ip = r.json()['origin']
>>> s = requests.Session()
>>> s.mount('http://', PrivoxyAdapter('http://localhost:8118'))
>>> r = s.get('http://httpbin.org/ip')
>>> assert r.status_code == 200
>>> anon_ip = r.json()['origin']
>>> assert anon_ip != public_ip
See also Requests Transport Adapters documentation.
Metadata
Release files for requests-proxy-adapter 0.1.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 | |
|---|---|---|---|
| requests_proxy_adapter-0.1.1.tar.gz | 179.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| requests_proxy_adapter-0.1.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 184.9 kB
Release files / requests_proxy_adapter-0.1.1.tar.gz
| Download URL | requests_proxy_adapter-0.1.1.tar.gz |
|---|---|
| Size | 179.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c918a72d50bb725ca41c55d6c2dfad2ffd8398f014384e23a756e2579373fb1
|
|
BLAKE2b-256 checksum How to use checksums |
30712623aa8128b8a06625ee94d9981fc6a4dde41d726f71076fc7c8b3017e5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/38.2.4 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.2
|
Release files / requests_proxy_adapter-0.1.1-py2.py3-none-any.whl
| Download URL | requests_proxy_adapter-0.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
8b9589c5c4f86031ba2eda70b300c1ad0db3ca1a4e0b4510f83a4c6c0fd1fe36
|
|
BLAKE2b-256 checksum How to use checksums |
0f01668214a2c4166647d59e34269d5d65b485efd0d8d6c7df617cc0905a8228
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/38.2.4 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.2
|