{
 "kind": "tool",
 "slug": "aiohttp",
 "path": "tools/aiohttp/",
 "name": "aiohttp",
 "maker": null,
 "density": "profile",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "HTTP clients and networking",
   "tools/http-clients/"
  ]
 ],
 "lead": "Async HTTP client/server framework for Python with WebSocket support.",
 "chips": [
  {
   "label": "HTTP clients and networking",
   "path": "tools/http-clients/"
  },
  {
   "label": "PYPI"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "pip install aiohttp"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/aio-libs/aiohttp"
  },
  {
   "label": "Website",
   "href": "https://github.com/aio-libs/aiohttp"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "Apache-2.0 AND MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from PyPI license expression.",
   "src": "https://github.com/aio-libs/aiohttp"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 23, 2026",
   "note": "Latest GitHub release Oct 11, 2026. ",
   "src": "https://github.com/aio-libs/aiohttp"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "125 projects",
   "status": "info",
   "sub": "#6 of 126 in its category",
   "note": "Dependency in 125 public GitHub projects set up for AI coding agents that we scanned (2.0%).",
   "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.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What aiohttp does",
   "parts": [
    {
     "t": "prose",
     "text": "aiohttp is one asyncio library that covers both sides of HTTP, a client and a web server, with WebSockets on each side built in. The project behind it dates to 2013."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "aiohttp popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "81",
       "of": "/ 100",
       "l": "Gid Score, #80 overall"
      },
      {
       "n": "134M",
       "l": "downloads a week, pypi"
      },
      {
       "n": "16.6K",
       "l": "GitHub stars"
      },
      {
       "n": "125",
       "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 aiohttp is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "aiohttp is a dependency in 125 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (7.7% of the 1,623 Python ones), #6 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,864; those are left out of every share on this page.",
      "The most used alternative in our scan is httpx (280 projects).",
      "Projects that use it most often also use python-dotenv (76.0%), Pydantic (68.0%), Requests (63.2%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "64 projects, 2.0%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "58 projects, 1.9%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "50 projects, 2.0%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "13 projects, 2.7%",
       "v": "Gemini CLI",
       "path": "agents/gemini-cli/"
      },
      {
       "l": "11 projects, 3.3%",
       "v": "OpenClaw",
       "path": "agents/openclaw/"
      },
      {
       "l": "8 projects, 2.9%",
       "v": "Devin Desktop",
       "path": "agents/devin-desktop/"
      },
      {
       "l": "7 projects, 1.5%",
       "v": "OpenAI Codex",
       "path": "agents/openai-codex/"
      },
      {
       "l": "5 projects, 1.5%",
       "v": "OpenCode",
       "path": "agents/opencode/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 76.0% of its projects",
       "v": "python-dotenv",
       "path": "tools/python-dotenv/"
      },
      {
       "l": "In 68.0% of its projects",
       "v": "Pydantic",
       "path": "tools/pydantic/"
      },
      {
       "l": "In 63.2% of its projects",
       "v": "Requests",
       "path": "tools/requests-py/"
      },
      {
       "l": "In 59.2% of its projects",
       "v": "Uvicorn",
       "path": "tools/uvicorn/"
      },
      {
       "l": "In 57.6% of its projects",
       "v": "FastAPI",
       "path": "tools/fastapi/"
      },
      {
       "l": "In 45.6% of its projects",
       "v": "PyYAML",
       "path": "tools/pyyaml/"
      },
      {
       "l": "In 43.2% of its projects",
       "v": "NumPy",
       "path": "tools/numpy/"
      },
      {
       "l": "In 41.6% of its projects",
       "v": "OpenAI Python Library",
       "path": "tools/openai-pypi/"
      }
     ]
    }
   ]
  },
  {
   "id": "profile",
   "nav": "Profile",
   "h2": "aiohttp in practice",
   "parts": [
    {
     "t": "h3",
     "text": "Strengths"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Client and server in one package",
       "v": "The same install gives you an HTTP client and a web server. The README's examples cover both: a <code>ClientSession</code> request and a small <code>web.Application</code> with routes."
      },
      {
       "l": "WebSockets on both ends, no callbacks",
       "v": "The README says WebSocket support works out of the box for client and server and \"avoids Callback Hell\". In its server example, a handler receives messages with <code>async for msg in ws</code> and replies with <code>send_str</code> or <code>send_bytes</code>."
      },
      {
       "l": "Middleware on the client too",
       "v": "The web server has middlewares, signals and pluggable routing. The docs also list client middleware for customizing request and response processing."
      },
      {
       "l": "A written deprecation window",
       "v": "The docs promise that a deprecated public API keeps working for at least a year and a half after the release that deprecates it. Every deprecation raises <code>DeprecationWarning</code>."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Watch out for"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "More code than requests",
       "v": "The README and docs point people coming from requests to a page titled \"why we need so many lines\". The session and the response are both opened with <code>async with</code> blocks."
      },
      {
       "l": "Fast DNS is a separate install",
       "v": "aiodns is optional, but the README calls it \"highly recommended for sake of speed\". Brotli compression on the client also needs an extra package, Brotli or brotlicffi."
      },
      {
       "l": "The compatibility rule has exceptions",
       "v": "The maintainers write that they sometimes break their own deprecation rule. Their example is a critical bug that cannot be fixed without a major API change."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Fetch a page with ClientSession"
    },
    {
     "t": "tabs",
     "label": "Example",
     "items": [
      {
       "tab": "Python",
       "code": "import aiohttp\nimport asyncio\n\nasync def main():\n\n    async with aiohttp.ClientSession() as session:\n        async with session.get('https://python.org') as response:\n\n            print(\"Status:\", response.status)\n            print(\"Content-type:\", response.headers['content-type'])\n\n            html = await response.text()\n            print(\"Body:\", html[:15], \"...\")\n\nasyncio.run(main())"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "profile",
   "h2": "More about aiohttp",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Funding",
       "path": "tools/funding/",
       "items": [
        "GitHub Sponsors: https://github.com/aio-libs",
        "GitHub Sponsors: https://github.com/asvetlov",
        "GitHub Sponsors: https://github.com/webknjaz",
        "GitHub Sponsors: https://github.com/Dreamsorcerer",
        "Open Collective: https://opencollective.com/aiohttp",
        "Tidelift: https://tidelift.com/funding/github/pypi/aiohttp",
        "Own page: https://opencollective.com/aio-libs",
        "7 GitHub sponsors"
       ]
      },
      {
       "title": "Head to head",
       "items": [
        {
         "text": "httpx vs aiohttp",
         "note": "used together in 32 projects",
         "path": "tools/compare/httpx-vs-aiohttp/"
        }
       ]
      },
      {
       "title": "Packages around it",
       "items": [
        "python-dotenv: .env file loader",
        "requests: Synchronous HTTP client",
        "pydantic: Data validation",
        "solders: Solana types and bindings",
        "websockets: WebSocket library",
        "solana: Solana Python SDK"
       ]
      },
      {
       "title": "More in HTTP clients and networking",
       "path": "tools/http-clients/",
       "items": [
        {
         "text": "Axios",
         "path": "tools/axios/"
        },
        {
         "text": "Requests",
         "path": "tools/requests-py/"
        },
        {
         "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/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "aiohttp",
       "me": true,
       "facts": [
        "Apache-2.0 AND MIT",
        "Gid 81",
        "134M/wk"
       ]
      },
      {
       "name": "httpx",
       "why": "Modern Python HTTP client with async support, replacing the standard requests library.",
       "path": "tools/httpx/",
       "facts": [
        "BSD",
        "Gid 78",
        "198M/wk"
       ]
      },
      {
       "name": "websocket-client",
       "why": "WebSocket client library for Python with low-level API options.",
       "path": "tools/websocket-client/",
       "facts": [
        "Apache-2.0",
        "Gid 69",
        "41.6M/wk"
       ]
      }
     ],
     "more": "Compare aiohttp with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "pip install aiohttp"
    },
    {
     "t": "h3",
     "text": "Rules for your agent"
    },
    {
     "t": "rules",
     "label": "Paste into AGENTS.md or CLAUDE.md",
     "text": "## aiohttp\n- Make requests inside `async with aiohttp.ClientSession() as session:`, open each response with `async with session.get(...) as response:`, and `await response.text()` for the body.\n- Do not create a `ClientSession` outside of an event loop; the docs FAQ calls this dangerous.\n- Install `aiohttp[speedups]`, or at least `aiodns`, which the docs call highly recommended for DNS speed.\n- Run with `python -X dev` during development. aiohttp then uses a strict client parser and adds extra warnings.\n- Treat `DeprecationWarning` from aiohttp as a to-do. Deprecated APIs are kept for at least a year and a half, then can go away.\n- For servers, register handlers with `app.add_routes([web.get(...)])` and start with `web.run_app(app)`. For WebSockets, create `web.WebSocketResponse()` and `await ws.prepare(request)` before reading messages.\n- On 3.14.4 and later, raise `client_max_fields` on `web.Application` if forms can exceed 1000 fields; otherwise they get a 413.\n"
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "pypi aiohttp"
  ],
  [
   "Category",
   "HTTP clients and networking"
  ],
  [
   "License",
   "Apache-2.0 AND MIT"
  ],
  [
   "Latest version",
   "v3.14.4, October 5, 2026"
  ],
  [
   "On GitHub since",
   "October 2013"
  ],
  [
   "Gid Score",
   "81.2"
  ],
  [
   "Rank in category",
   "#6 of 126"
  ],
  [
   "GitHub",
   "aio-libs/aiohttp"
  ],
  [
   "Last change",
   "Nov 23, 2026"
  ]
 ],
 "good": [
  "Used by Pulp, Molotov, Arsenic, Home Assistant, as listed by the source; we have not checked each one."
 ],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/aio-libs.png"
}