Python HTTP library with thread-safe connection pooling, file post support, user friendly, and more.
  • Python 98.8%
  • HTML 0.8%
  • JavaScript 0.4%
Find a file
dependabot[bot] 5c5fcb0556
Some checks failed
CI / package (push) Failing after 0s
CI / macOS 3.10 (push) Failing after 0s
CI / macOS 3.11 (push) Failing after 0s
CI / macOS 3.12 (push) Failing after 0s
CI / macOS 3.8 (push) Failing after 0s
CI / macOS 3.9 (push) Failing after 0s
CI / Ubuntu 22.04 (OpenSSL 3.0) 3.10 (push) Failing after 0s
CI / Ubuntu 22.04 (OpenSSL 3.0) 3.11 (push) Failing after 0s
CI / Ubuntu 22.04 (OpenSSL 3.0) 3.12 (push) Failing after 0s
CI / Ubuntu 22.04 (OpenSSL 3.0) 3.9 (push) Failing after 0s
CI / Windows 3.10 (push) Failing after 0s
CI / Windows 3.11 (push) Failing after 0s
CI / Windows 3.12 (push) Failing after 0s
CI / Windows 3.8 (push) Failing after 0s
CI / Windows 3.9 (push) Failing after 0s
CI / (push) Failing after 0s
CI / Ubuntu 20.04 (OpenSSL 1.1.1) 3.8 test-3.8 (push) Failing after 0s
CI / Ubuntu 20.04 (OpenSSL 1.1.1) 3.9.2 test-3.9 (push) Failing after 0s
CI / Ubuntu pypy-3.10 test-pypy3.10 (push) Failing after 0s
CI / Ubuntu pypy-3.8 test-pypy3.8 (push) Failing after 0s
CI / Ubuntu pypy-3.9-v7.3.13 test-pypy3.9 (push) Failing after 0s
CI / Ubuntu 3.x test_brotlipy (push) Failing after 0s
CI / Ubuntu 3.12 test_integration (push) Failing after 0s
CI / Ubuntu 3.8 test_integration (push) Failing after 0s
CI / Ubuntu 3.9 test_integration (push) Failing after 0s
CI / macOS 3.13 (push) Failing after 0s
CI / Ubuntu 22.04 (OpenSSL 3.0) 3.13 (push) Failing after 0s
CI / Windows 3.13 (push) Failing after 0s
CI / Ubuntu 3.11 emscripten (push) Failing after 0s
CI / coverage (push) Failing after 0s
Downstream / downstream (botocore) (push) Failing after 38s
CodeQL / Analyze (push) Has been skipped
lint / lint (push) Has been cancelled
Scorecard / Scorecard (push) Has been cancelled
Downstream / downstream (requests) (push) Has been cancelled
Bump actions/setup-python from 5.0.0 to 5.1.0 (#3372)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](0a5c615913...82c7e631bb)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 12:09:47 +03:00
.github Bump actions/setup-python from 5.0.0 to 5.1.0 (#3372) 2024-04-05 12:09:47 +03:00
changelog Change method return types to Self where suitable (#3364) 2024-03-17 22:12:13 +02:00
ci Remove Botocore patch for urllib3 2.x (#3098) 2023-07-29 06:46:34 +04:00
docs Use typing.Literal available in Python 3.8+ (#3365) 2024-03-17 22:31:22 +02:00
dummyserver Switch from ResponseTypes to ResponseReturnValue (#3373) 2024-04-04 13:48:39 +04:00
notes Fix a name of an attribute in docs (#3125) 2023-09-14 22:42:11 +03:00
src/urllib3 Use typing.Literal available in Python 3.8+ (#3365) 2024-03-17 22:31:22 +02:00
test Adjust tests to temporary failures with CPython 3.13.0a5 (#3371) 2024-03-28 23:59:06 +02:00
.coveragerc Speed up Python 3.11 CI by upgrading coverage 2023-01-10 06:58:21 -06:00
.eslintrc.yml Add native Emscripten support 2023-11-25 16:43:08 -06:00
.gitignore Prevent git from ignoring .github/ 2020-04-19 13:01:48 -05:00
.pre-commit-config.yaml Add native Emscripten support 2023-11-25 16:43:08 -06:00
.readthedocs.yml Bring 2.0.7 & 1.26.18 to main (#3161) 2023-10-17 21:07:33 +03:00
CHANGES.rst Fix changelog entry which was inverted (#3348) 2024-02-21 16:51:11 +04:00
CODE_OF_CONDUCT.md Add Contributor Covenant as Code of Conduct 2020-09-22 14:42:38 -05:00
dev-requirements.txt Adjust tests to temporary failures with CPython 3.13.0a5 (#3371) 2024-03-28 23:59:06 +02:00
emscripten-requirements.txt Add native Emscripten support 2023-11-25 16:43:08 -06:00
LICENSE.txt Remove outdated reference in LICENSE.txt 2023-05-19 07:57:57 -05:00
mypy-requirements.txt Fix type checking when zstandard is installed 2024-02-25 19:03:24 -06:00
noxfile.py Remove Flask pins from requests downstream tests 2024-02-21 10:13:49 -06:00
pyproject.toml Add rudimentary HTTP/2 connection and response 2024-01-22 09:27:03 -06:00
README.md Mention myself in README 2023-11-12 14:58:01 -06:00
setup.cfg Configure ptyest, isort and mypy in pyproject.toml 2022-11-10 15:35:52 -06:00
towncrier.toml Generate changelog with towncrier 2021-08-03 21:59:47 +04:00

urllib3

PyPI Version Python Versions Join our Discord Coverage Status Build Status on GitHub Documentation Status
OpenSSF Scorecard SLSA 3 CII Best Practices

urllib3 is a powerful, user-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, deflate, brotli, and zstd encoding.
  • Proxy support for HTTP and SOCKS.
  • 100% test coverage.

urllib3 is powerful and easy to use:

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

Installing

urllib3 can be installed with pip:

$ python -m pip install urllib3

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

$ git clone https://github.com/urllib3/urllib3.git
$ cd urllib3
$ pip install .

Documentation

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

Community

urllib3 has a community Discord channel for asking questions and collaborating with other contributors. Drop by and say hello 👋

Contributing

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

Security Disclosures

To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure with maintainers.

Maintainers

👋

Sponsorship

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

For Enterprise

Professional support for urllib3 is available as part of the Tidelift Subscription. Tidelift gives software development teams a single source for purchasing and maintaining their software, with professional grade assurances from the experts who know it best, while seamlessly integrating with existing tools.