Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

urllib3

Dependable web requests from Python code.

HTTP clients and networkingPYPI

GitHub

1. License

“to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software”

MIT allows use in paid and closed-source products.

github.com/urllib3/urllib3/blob/main/LICENSE.txt

From the package registry and GitHub, checked daily; card checked Nov 10, 2026. Tap a verdict to see its source.How we checkedReport an error

What urllib3 does

urllib3 is a free Python library your app uses to talk to other websites and online services. It reuses connections, tries again when a service hiccups, stops waiting after a time limit and checks secure connections. Popular tools such as Requests and Python's own installer are built on it, so it is often already in your project.

What people build with it

Survive a busy outside service

Your app reads prices or orders from another service that sometimes answers "busy"; it waits a moment and tries again instead of failing.

Send data to a webhook

When an order is paid, your backend posts its details to a chat bot, a shop or a partner's system.

Upload a file to a service

Your app sends a report or a photo to another service the same way a browser form would.

Never hang on a slow service

A partner's server stops answering; your page gives up after a few seconds and shows a message instead of freezing.

Download big files in pieces

Your app fetches a large export or video and writes it to disk bit by bit, so memory stays low.

Many requests from worker threads

A background job checks hundreds of links at once from several threads and shares one set of open connections.

urllib3 popularity

75 / 100
Gid Score, #215 overall
376M
downloads a week, pypi
4,086
GitHub stars
98
agent projects use it
urllib3: downloads per weekPyPI, urllib3 374,661,150
urllib3: GitHub starsurllib3/urllib3 4,086

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How urllib3 is used

  • urllib3 is a dependency in 98 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (6.0% of the 1,623 Python ones), #12 of 126 in http clients and networking.
  • Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 1,524; those are left out of every share on this page.
  • The most used alternative in our scan is Requests (425 projects).
  • Projects that use it most often also use Requests (89.8%), Pydantic (67.3%), charset-normalizer (62.2%).

By coding agent

55 projects, 1.7%
54 projects, 1.8%
34 projects, 1.4%
13 projects, 2.8%
9 projects, 1.9%
7 projects, 2.1%
5 projects, 1.8%

Often used with

In 89.8% of its projects
In 67.3% of its projects
In 62.2% of its projects
In 56.1% of its projects
In 56.1% of its projects
In 55.1% of its projects
In 53.1% of its projects

More about urllib3

Funding
  • GitHub Sponsors: https://github.com/urllib3
  • Tidelift: https://tidelift.com/funding/github/pypi/urllib3
  • Open Collective: https://opencollective.com/urllib3
  • 17 GitHub sponsors

See all

Head to head
More in HTTP clients and networking

Alternatives

urllib3 This page

MITGid 75376M/wk

Requests

Pick Requests for the simplest everyday Python code; it is built on urllib3 and adds friendlier helpers.

Apache-2.0Gid 8835M/wk

httpx

Pick httpx when your Python app is asynchronous (async/await) and you want one client for both styles.

BSDGid 78198M/wk

aiohttp

Pick aiohttp when you need an async client and a small web server or WebSockets in the same library.

Apache-2.0 AND MITGid 81134M/wk

Compare urllib3 with another tool

Get started

Tell your AI assistant

“Use the Python library urllib3 (pin urllib3==2.8.0, Python 3.10+) with one shared PoolManager, an explicit Timeout(connect=2, read=10) and Retry(total=3, status_forcelist=[502, 503, 504], backoff_factor=0.5), and check resp.status yourself because error pages do not raise.”

  1. Install urllib3 into your project's Python environment (Python 3.10 or newer).

    $ python -m pip install urllib3
    

    From github.com/urllib3/urllib3/blob/main/README.md

  2. Make one PoolManager for your app and send requests through it.

    import urllib3
    # Creating a PoolManager instance for sending requests.
    http = urllib3.PoolManager()
    # Sending a GET request and getting back response as HTTPResponse object.
    resp = http.request("GET", "https://httpbin.org/robots.txt")
    # Print the returned data.
    print(resp.data)
    

    From urllib3.readthedocs.io/en/stable/user-guide.html

  3. Read the answer: resp.status, resp.headers, resp.data, or resp.json() for JSON.

    From urllib3.readthedocs.io/en/stable/user-guide.html

Mistakes to avoid

http.request("GET", url) with no timeout
urllib3.PoolManager(timeout=urllib3.Timeout(connect=2.0, read=10.0)) or timeout= on each request

Without a timeout the read waits for the system default, which can be forever.

Assuming a 404 or 500 raises an exception
Check resp.status (for example if resp.status >= 400) before using resp.data

request() returns the response for any status; in our run a 404 came back with no exception.

Retry(status_forcelist=[503]) and expecting a failed POST to be retried
Retry only idempotent calls, or pass allowed_methods including POST when the server handles duplicates safely

POST is not in the default list of retried methods.

Code from urllib3 1.x tutorials, for example HTTPResponse(strict=...) or urllib3.contrib.securetransport
Use urllib3 2.x code; remove strict and the removed contrib modules

urllib3 2 removed several old modules and parameters.

cert_reqs="CERT_NONE" to silence a certificate error
Keep verification on; point ca_certs at a proper bundle such as certifi.where()

Turning verification off lets anyone in the middle read or change the traffic.

Questions

Can I use it in a paid, closed-source app?

Yes. It is MIT-licensed; keep the copyright and license notice with its files.

Does it raise an error for a 404 or 500 answer?

No. You get a response with its status code and check resp.status yourself (our run got 404 with no exception).

How many times does it retry by default?

Three retries and up to three redirects, unless you change the retries setting.

Does it check HTTPS certificates?

Yes, by default. You can switch it off, but the docs strongly advise against it.

Why does pip install an old urllib3 1.26 in my project?

Usually an old botocore (AWS) version asks for it; upgrading to Python 3.10+ and a current botocore lets urllib3 2 install.