Skip to main content

Requests Proxy Adapter

https://img.shields.io/pypi/v/requests_proxy_adapter.svg https://img.shields.io/travis/Otetz/requests_proxy_adapter.svg Maintainability Documentation Status Updates

Set of Proxy Transport Adapters for Requests.

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.

Authors

Alexey Shevchenko <otetz@me.com>

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)

Source distribution for requests-proxy-adapter 0.1.1
File Size Uploaded
requests_proxy_adapter-0.1.1.tar.gz 179.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for requests-proxy-adapter 0.1.1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

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