Python HTTP library with thread-safe connection pooling, file post support, sanity friendly, and more.
Python Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
_appveyor Test AppVeyor Oct 23, 2016
_travis ;; Jan 10, 2018
docs Update Python 2 doc link to Python 3 (#1395) Jun 10, 2018
dummyserver Fix test_client_intermediate and test_client_no_intermediate for macOS ( Aug 14, 2018
src/urllib3 Support a servername parameter on HTTPSConnections which overrides th… Jul 12, 2018
test Fix coverage reports after src/urlib3 move (#1425) Aug 16, 2018
.coveragerc Fix codecov coverage by collapsing paths in tox (#1428) Aug 20, 2018
.gitignore Reverted some changes to gitignore Jan 13, 2012
.hgignore Removed egg-info, updated hgignore. Sep 18, 2011
.hgtags Added tag 0.4.1 for changeset 38339cf1816e Jul 18, 2011
.travis.yml remove python 3.7 from allow_failures Apr 20, 2018
CHANGES.rst Support a servername parameter on HTTPSConnections which overrides th… Jul 12, 2018
CONTRIBUTORS.txt Handle EINTR from poll with zero timeout (#1399) Jun 22, 2018
LICENSE.txt Update license year range to 2016 Jan 26, 2016
MANIFEST.in Packaging: Tweaking MANIFEST.in to add missing files. Aug 6, 2014
Makefile clarify how to setup a virtual env and run a small number of tests (#… Apr 8, 2018
README.rst Fix my name in README.rst (#1390) May 28, 2018
appveyor.yml Fix AppVeyor build (#1369) Apr 20, 2018
codecov.yml Make codecov enforce 100% coverage. Oct 20, 2016
dev-requirements.txt Fix codecov coverage by collapsing paths in tox (#1428) Aug 20, 2018
release.sh Fix release script Jun 11, 2016
setup.cfg Pin pyOpenSSL major version to 17.* for Python 2.6 (#1389) May 28, 2018
setup.py Move urllib3 to src/urllib3 Jul 3, 2018
tox.ini Fix codecov coverage by collapsing paths in tox (#1428) Aug 20, 2018

README.rst

urllib3

Build status on Travis Build status on AppVeyor Documentation Status Coverage Status PyPI version Bountysource Gitter

urllib3 is a powerful, sanity-friendly HTTP client for Python. Much of the Python ecosystem already uses urllib3 and you should too. urllib3 brings many critical features that are missing from the Python standard libraries:

  • Thread safety.
  • Connection pooling.
  • Client-side SSL/TLS verification.
  • File uploads with multipart encoding.
  • Helpers for retrying requests and dealing with HTTP redirects.
  • Support for gzip and deflate encoding.
  • Proxy support for HTTP and SOCKS.
  • 100% test coverage.

urllib3 is powerful and easy to use:

>>> import urllib3
>>> http = urllib3.PoolManager()
>>> r = http.request('GET', 'http://httpbin.org/robots.txt')
>>> r.status
200
>>> r.data
'User-agent: *\nDisallow: /deny\n'

Installing

urllib3 can be installed with pip:

$ pip install urllib3

Alternatively, you can grab the latest source code from GitHub:

$ git clone git://github.com/urllib3/urllib3.git
$ python setup.py install

Documentation

urllib3 has usage and reference documentation at urllib3.readthedocs.io.

Contributing

urllib3 happily accepts contributions. Please see our contributing documentation for some tips on getting started.

Maintainers

👋

Sponsorship

If your company benefits from this library, please consider sponsoring its development.

Sponsors include:

  • Google Cloud Platform (2018-present), sponsors @theacodes's work on an ongoing basis
  • Abbott (2018-present), sponsors @SethMichaelLarson's work on an ongoing basis
  • Akamai (2017-present), sponsors @haikuginger's work on an ongoing basis
  • Hewlett Packard Enterprise (2016-2017), sponsored @Lukasa’s work on urllib3