Metadata-Version: 2.1
Name: requests-proxy-adapter
Version: 0.1.1
Summary: Set of Proxy Transport Adapters fro Requests
Home-page: https://github.com/otetz/requests_proxy_adapter
Author: Alexey Shevchenko
Author-email: otetz@me.com
License: MIT license
Description-Content-Type: UNKNOWN
Keywords: requests,proxy
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Requires-Dist: pluggy (==0.11.0)
Requires-Dist: requests (==2.22.0)
Requires-Dist: urllib3 (>=1.15)
Provides-Extra: dev
Requires-Dist: flake8 (==3.7.7); extra == 'dev'
Requires-Dist: Sphinx (==2.0.1); extra == 'dev'
Provides-Extra: test
Requires-Dist: tox (==3.11.1); extra == 'test'
Requires-Dist: coverage (==4.5.3); extra == 'test'
Requires-Dist: pytest (==4.5.0); extra == 'test'
Requires-Dist: pytest-runner (==4.4); extra == 'test'
Requires-Dist: pytest-cov (==2.7.1); extra == 'test'
Requires-Dist: flaky (==3.5.3); extra == 'test'

######################
Requests Proxy Adapter
######################


.. image:: https://img.shields.io/pypi/v/requests_proxy_adapter.svg
        :target: https://pypi.python.org/pypi/requests_proxy_adapter

.. image:: https://img.shields.io/travis/Otetz/requests_proxy_adapter.svg
        :target: https://travis-ci.org/Otetz/requests_proxy_adapter

.. image:: https://api.codeclimate.com/v1/badges/9f40b1896cbea3ac418a/maintainability
   :target: https://codeclimate.com/github/Otetz/requests_proxy_adapter/maintainability
   :alt: Maintainability

.. image:: https://readthedocs.org/projects/requests-proxy-adapter/badge/?version=latest
        :target: https://requests-proxy-adapter.readthedocs.io/en/latest/?badge=latest
        :alt: Documentation Status

.. image:: https://pyup.io/repos/github/Otetz/requests_proxy_adapter/shield.svg
     :target: https://pyup.io/repos/github/Otetz/requests_proxy_adapter/
     :alt: Updates


Set of Proxy Transport Adapters for `Requests <http://docs.python-requests.org/en/latest/>`_.

* Free software: MIT license
* Documentation: https://requests-proxy-adapter.readthedocs.io.


Features
********

* `PrivoxyAdapter <./requests_proxy_adapter.html#requests_proxy_adapter.api.PrivoxyAdapter>`_ -- The transport adapter
  for `Requests <http://docs.python-requests.org/en/latest/>`_ to use Privoxy proxy-server with retries when backend
  errors occurred.
* `RetryPrivoxyAdapter <./requests_proxy_adapter.html#requests_proxy_adapter.api.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 <http://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html#module-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.

.. _Requests Transport Adapters: http://docs.python-requests.org/en/latest/user/advanced/#transport-adapters

Authors
*******

Alexey Shevchenko <otetz@me.com>



