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.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size requests_proxy_adapter-0.1.1-py2.py3-none-any.whl (5.8 kB) | File type Wheel | Python version py2.py3 | Upload date | Hashes View |
Filename, size requests_proxy_adapter-0.1.1.tar.gz (179.1 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for requests_proxy_adapter-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b9589c5c4f86031ba2eda70b300c1ad0db3ca1a4e0b4510f83a4c6c0fd1fe36 |
|
MD5 | 68ad0bdb67791547e13ca827830c2345 |
|
BLAKE2-256 | 0f01668214a2c4166647d59e34269d5d65b485efd0d8d6c7df617cc0905a8228 |
Close
Hashes for requests_proxy_adapter-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c918a72d50bb725ca41c55d6c2dfad2ffd8398f014384e23a756e2579373fb1 |
|
MD5 | 9047bb4f08dff1a3e1e314043c29f8a2 |
|
BLAKE2-256 | 30712623aa8128b8a06625ee94d9981fc6a4dde41d726f71076fc7c8b3017e5a |