{
 "kind": "tool",
 "slug": "urllib3",
 "path": "tools/urllib3/",
 "name": "urllib3",
 "maker": null,
 "density": "full",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "HTTP clients and networking",
   "tools/http-clients/"
  ]
 ],
 "lead": "Dependable web requests from Python code.",
 "chips": [
  {
   "label": "HTTP clients and networking",
   "path": "tools/http-clients/"
  },
  {
   "label": "PYPI"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "pip install urllib3"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/urllib3/urllib3"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software",
   "note": "MIT allows use in paid and closed-source products.",
   "src": "https://github.com/urllib3/urllib3/blob/main/LICENSE.txt"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 14, 2026",
   "note": "Latest GitHub release Sep 15, 2026. ",
   "src": "https://github.com/urllib3/urllib3"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "98 projects",
   "status": "info",
   "sub": "#12 of 126 in its category",
   "note": "Dependency in 98 public GitHub projects set up for AI coding agents that we scanned (1.6%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Install only",
   "status": "info",
   "sub": null,
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily; card checked Nov 10, 2026.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What urllib3 does",
   "parts": [
    {
     "t": "prose",
     "text": "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."
    },
    {
     "t": "h3",
     "text": "What people build with it"
    },
    {
     "t": "uses",
     "items": [
      {
       "title": "Survive a busy outside service",
       "text": "Your app reads prices or orders from another service that sometimes answers \"busy\"; it waits a moment and tries again instead of failing.",
       "idea": false
      },
      {
       "title": "Send data to a webhook",
       "text": "When an order is paid, your backend posts its details to a chat bot, a shop or a partner's system.",
       "idea": false
      },
      {
       "title": "Upload a file to a service",
       "text": "Your app sends a report or a photo to another service the same way a browser form would.",
       "idea": false
      },
      {
       "title": "Never hang on a slow service",
       "text": "A partner's server stops answering; your page gives up after a few seconds and shows a message instead of freezing.",
       "idea": false
      },
      {
       "title": "Download big files in pieces",
       "text": "Your app fetches a large export or video and writes it to disk bit by bit, so memory stays low.",
       "idea": false
      },
      {
       "title": "Many requests from worker threads",
       "text": "A background job checks hundreds of links at once from several threads and shares one set of open connections.",
       "idea": false
      }
     ]
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "urllib3 popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "75",
       "of": "/ 100",
       "l": "Gid Score, #215 overall"
      },
      {
       "n": "376M",
       "l": "downloads a week, pypi"
      },
      {
       "n": "4,086",
       "l": "GitHub stars"
      },
      {
       "n": "98",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How urllib3 is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "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%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "55 projects, 1.7%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "54 projects, 1.8%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "34 projects, 1.4%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "13 projects, 2.8%",
       "v": "OpenAI Codex",
       "path": "agents/openai-codex/"
      },
      {
       "l": "9 projects, 1.9%",
       "v": "Gemini CLI",
       "path": "agents/gemini-cli/"
      },
      {
       "l": "7 projects, 2.1%",
       "v": "OpenClaw",
       "path": "agents/openclaw/"
      },
      {
       "l": "5 projects, 1.8%",
       "v": "Devin Desktop",
       "path": "agents/devin-desktop/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 89.8% of its projects",
       "v": "Requests",
       "path": "tools/requests-py/"
      },
      {
       "l": "In 67.3% of its projects",
       "v": "Pydantic",
       "path": "tools/pydantic/"
      },
      {
       "l": "In 62.2% of its projects",
       "v": "charset-normalizer",
       "path": "tools/charset-normalizer/"
      },
      {
       "l": "In 56.1% of its projects",
       "v": "Click",
       "path": "tools/click-py/"
      },
      {
       "l": "In 56.1% of its projects",
       "v": "PyYAML",
       "path": "tools/pyyaml/"
      },
      {
       "l": "In 55.1% of its projects",
       "v": "python-dotenv",
       "path": "tools/python-dotenv/"
      },
      {
       "l": "In 53.1% of its projects",
       "v": "Uvicorn",
       "path": "tools/uvicorn/"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "usage",
   "h2": "More about urllib3",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Funding",
       "path": "tools/funding/",
       "items": [
        "GitHub Sponsors: https://github.com/urllib3",
        "Tidelift: https://tidelift.com/funding/github/pypi/urllib3",
        "Open Collective: https://opencollective.com/urllib3",
        "17 GitHub sponsors"
       ]
      },
      {
       "title": "Head to head",
       "items": [
        {
         "text": "httpx vs urllib3",
         "note": "used together in 14 projects",
         "path": "tools/compare/httpx-vs-urllib3/"
        },
        {
         "text": "Requests vs urllib3",
         "note": "used together in 88 projects",
         "path": "tools/compare/requests-vs-urllib3/"
        }
       ]
      },
      {
       "title": "More in HTTP clients and networking",
       "path": "tools/http-clients/",
       "items": [
        {
         "text": "Axios",
         "path": "tools/axios/"
        },
        {
         "text": "ws",
         "path": "tools/ws/"
        },
        {
         "text": "postgres",
         "path": "tools/postgres/"
        },
        {
         "text": "websockets",
         "path": "tools/websockets/"
        },
        {
         "text": "redis (Python)",
         "path": "tools/redis-pypi/"
        },
        {
         "text": "undici",
         "path": "tools/undici/"
        },
        {
         "text": "node-fetch",
         "path": "tools/node-fetch/"
        },
        {
         "text": "ioredis",
         "path": "tools/ioredis/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "urllib3",
       "me": true,
       "facts": [
        "MIT",
        "Gid 75",
        "376M/wk"
       ]
      },
      {
       "name": "Requests",
       "why": "Pick Requests for the simplest everyday Python code; it is built on urllib3 and adds friendlier helpers.",
       "path": "tools/requests-py/",
       "facts": [
        "Apache-2.0",
        "Gid 88",
        "35M/wk"
       ]
      },
      {
       "name": "httpx",
       "why": "Pick httpx when your Python app is asynchronous (async/await) and you want one client for both styles.",
       "path": "tools/httpx/",
       "facts": [
        "BSD",
        "Gid 78",
        "198M/wk"
       ]
      },
      {
       "name": "aiohttp",
       "why": "Pick aiohttp when you need an async client and a small web server or WebSockets in the same library.",
       "path": "tools/aiohttp/",
       "facts": [
        "Apache-2.0 AND MIT",
        "Gid 81",
        "134M/wk"
       ]
      }
     ],
     "more": "Compare urllib3 with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "prompt",
     "text": "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."
    },
    {
     "t": "steps",
     "items": [
      {
       "text": "Install urllib3 into your project's Python environment (Python 3.10 or newer).",
       "code": "$ python -m pip install urllib3\n",
       "src": "https://github.com/urllib3/urllib3/blob/main/README.md"
      },
      {
       "text": "Make one PoolManager for your app and send requests through it.",
       "code": "import urllib3\n# Creating a PoolManager instance for sending requests.\nhttp = urllib3.PoolManager()\n# Sending a GET request and getting back response as HTTPResponse object.\nresp = http.request(\"GET\", \"https://httpbin.org/robots.txt\")\n# Print the returned data.\nprint(resp.data)\n",
       "src": "https://urllib3.readthedocs.io/en/stable/user-guide.html"
      },
      {
       "text": "Read the answer: resp.status, resp.headers, resp.data, or resp.json() for JSON.",
       "code": null,
       "src": "https://urllib3.readthedocs.io/en/stable/user-guide.html"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Mistakes to avoid"
    },
    {
     "t": "mistakes",
     "items": [
      {
       "dont": "http.request(\"GET\", url) with no timeout",
       "fix": "urllib3.PoolManager(timeout=urllib3.Timeout(connect=2.0, read=10.0)) or timeout= on each request",
       "why": "Without a timeout the read waits for the system default, which can be forever."
      },
      {
       "dont": "Assuming a 404 or 500 raises an exception",
       "fix": "Check resp.status (for example if resp.status >= 400) before using resp.data",
       "why": "request() returns the response for any status; in our run a 404 came back with no exception."
      },
      {
       "dont": "Retry(status_forcelist=[503]) and expecting a failed POST to be retried",
       "fix": "Retry only idempotent calls, or pass allowed_methods including POST when the server handles duplicates safely",
       "why": "POST is not in the default list of retried methods."
      },
      {
       "dont": "Code from urllib3 1.x tutorials, for example HTTPResponse(strict=...) or urllib3.contrib.securetransport",
       "fix": "Use urllib3 2.x code; remove strict and the removed contrib modules",
       "why": "urllib3 2 removed several old modules and parameters."
      },
      {
       "dont": "cert_reqs=\"CERT_NONE\" to silence a certificate error",
       "fix": "Keep verification on; point ca_certs at a proper bundle such as certifi.where()",
       "why": "Turning verification off lets anyone in the middle read or change the traffic."
      }
     ]
    }
   ]
  },
  {
   "id": "faq",
   "nav": "Questions",
   "h2": "Questions",
   "parts": [
    {
     "t": "faq",
     "items": [
      {
       "q": "Can I use it in a paid, closed-source app?",
       "a": "Yes. It is MIT-licensed; keep the copyright and license notice with its files.",
       "evidence": {
        "url": "https://github.com/urllib3/urllib3/blob/main/LICENSE.txt",
        "quote": "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software."
       }
      },
      {
       "q": "Does it raise an error for a 404 or 500 answer?",
       "a": "No. You get a response with its status code and check resp.status yourself (our run got 404 with no exception).",
       "evidence": {
        "url": "https://urllib3.readthedocs.io/en/stable/user-guide.html",
        "quote": "The HTTPResponse object provides status , data , and headers attributes:"
       }
      },
      {
       "q": "How many times does it retry by default?",
       "a": "Three retries and up to three redirects, unless you change the retries setting.",
       "evidence": {
        "url": "https://urllib3.readthedocs.io/en/stable/user-guide.html",
        "quote": "By default, urllib3 will retry requests 3 times and follow up to 3 redirects."
       }
      },
      {
       "q": "Does it check HTTPS certificates?",
       "a": "Yes, by default. You can switch it off, but the docs strongly advise against it.",
       "evidence": {
        "url": "https://urllib3.readthedocs.io/en/stable/user-guide.html",
        "quote": "HTTPS connections are now verified by default ( cert_reqs = \"CERT_REQUIRED\" )."
       }
      },
      {
       "q": "Why does pip install an old urllib3 1.26 in my project?",
       "a": "Usually an old botocore (AWS) version asks for it; upgrading to Python 3.10+ and a current botocore lets urllib3 2 install.",
       "evidence": {
        "url": "https://urllib3.readthedocs.io/en/stable/v2-migration-guide.html",
        "quote": "Note that botocore does support urllib3 2.x, but it only supports it on Python 3.10 and later, which mandates OpenSSL 1.1.1+."
       }
      }
     ]
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "pypi urllib3"
  ],
  [
   "Category",
   "HTTP clients and networking"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Gid Score",
   "74.6"
  ],
  [
   "Rank in category",
   "#12 of 126"
  ],
  [
   "GitHub",
   "urllib3/urllib3"
  ],
  [
   "Last change",
   "Nov 14, 2026"
  ]
 ],
 "good": [
  "It needs Python 3.10 or newer and a system with OpenSSL 1.1.1 or newer. Old servers such as Amazon Linux 2 fail on import.",
  "Without a timeout it may wait as long as the system allows, possibly forever. Always set one.",
  "By default it retries only safe kinds of requests. A failed POST, such as a payment, is not sent twice unless you ask for it."
 ],
 "checked_line": "Read by AgentGid from 9 official pages, card checked Nov 10, 2026; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/urllib3.png"
}