This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Proxy auto-config and auto-discovery for Python.

Project Description

PyPAC is a pure-Python library for finding proxy auto-config (PAC) files and making HTTP requests that respect them. PAC files are often used in organizations that need fine-grained and centralized control of proxy settings.

PyPAC provides a subclass of a Requests Session, so you can start using it immediately, with any PAC file transparently discovered and honoured:

>>> from pypac import PACSession
>>> session = PACSession()
>>> session.get('http://example.org')
...

If a PAC file isn’t found, then PACSession acts exactly like a regular Session.

PyPAC can find PAC files according to the DNS portion of the Web Proxy Auto-Discovery (WPAD) protocol. On Windows, PyPAC can also obtain the PAC file URL from the Internet Options dialog, via the registry.

Features

  • The same Requests API that you already know and love
  • Honour PAC setting from Windows Internet Options
  • Follow DNS Web Proxy Auto-Discovery protocol
  • Proxy authentication pass-through
  • Proxy failover and load balancing

PyPAC supports Python 2.7 and 3.3+.

Installation

Install PyPAC using pip:

$ pip install pypac

Documentation

PyPAC’s documentation is available at http://pypac.readthedocs.io/.

0.3.1 (2017-06-23)

  • Update GitHub username.

0.3.0 (2017-04-12)

  • Windows: Get system auto-proxy config setting using winreg module.
  • Windows: Accept local filesystem paths from system proxy auto-config setting.
  • Raise PacComplexityError when recursion limit is hit while parsing PAC file.
  • Support setting PACSession.proxy_auth and ProxyResolver.proxy_auth after constructing an instance.
  • Narrative docs.

0.2.1 (2017-01-19)

  • Require Js2Py >= 0.43 for Python 3.6 support, and to avoid needing to monkeypatch out pyimport.

0.1.0 (2016-06-12)

  • First release.
Release History

Release History

This version
History Node

0.3.1

History Node

0.3.0

History Node

0.2.1

History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pypac-0.3.1-py2.py3-none-any.whl (18.5 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Jun 24, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting