Set of Proxy Transport Adapters fro Requests
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file requests_proxy_adapter-0.1.1.tar.gz
.
File metadata
- Download URL: requests_proxy_adapter-0.1.1.tar.gz
- Upload date:
- Size: 179.1 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c918a72d50bb725ca41c55d6c2dfad2ffd8398f014384e23a756e2579373fb1 |
|
MD5 | 9047bb4f08dff1a3e1e314043c29f8a2 |
|
BLAKE2b-256 | 30712623aa8128b8a06625ee94d9981fc6a4dde41d726f71076fc7c8b3017e5a |
File details
Details for the file requests_proxy_adapter-0.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: requests_proxy_adapter-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 2, Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b9589c5c4f86031ba2eda70b300c1ad0db3ca1a4e0b4510f83a4c6c0fd1fe36 |
|
MD5 | 68ad0bdb67791547e13ca827830c2345 |
|
BLAKE2b-256 | 0f01668214a2c4166647d59e34269d5d65b485efd0d8d6c7df617cc0905a8228 |