{"id":13398495,"url":"https://github.com/aio-libs/aiohttp","last_synced_at":"2025-12-17T11:32:41.578Z","repository":{"id":37412716,"uuid":"13258039","full_name":"aio-libs/aiohttp","owner":"aio-libs","description":"Asynchronous HTTP client/server framework for asyncio and Python","archived":false,"fork":false,"pushed_at":"2025-05-05T11:10:58.000Z","size":33245,"stargazers_count":15637,"open_issues_count":268,"forks_count":2073,"subscribers_count":216,"default_branch":"master","last_synced_at":"2025-05-05T11:12:59.038Z","etag":null,"topics":["aiohttp","async","asyncio","hacktoberfest","http","http-client","http-server","python"],"latest_commit_sha":null,"homepage":"https://docs.aiohttp.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aio-libs.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":"CONTRIBUTING.rst","funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["asvetlov","webknjaz","Dreamsorcerer"]}},"created_at":"2013-10-01T23:04:01.000Z","updated_at":"2025-05-05T10:17:20.000Z","dependencies_parsed_at":"2023-10-16T12:27:57.134Z","dependency_job_id":"a7e1b4ec-0c01-46fc-abdd-02044ead9c38","html_url":"https://github.com/aio-libs/aiohttp","commit_stats":{"total_commits":9882,"total_committers":774,"mean_commits":"12.767441860465116","dds":0.6137421574580044,"last_synced_commit":"e6187f6808d647243d8cee115ec24c3eb1421183"},"previous_names":["keepsafe/aiohttp"],"tags_count":296,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aio-libs%2Faiohttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aio-libs%2Faiohttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aio-libs%2Faiohttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aio-libs%2Faiohttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aio-libs","download_url":"https://codeload.github.com/aio-libs/aiohttp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252498125,"owners_count":21757749,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aiohttp","async","asyncio","hacktoberfest","http","http-client","http-server","python"],"created_at":"2024-07-30T19:00:27.506Z","updated_at":"2025-12-17T11:32:41.572Z","avatar_url":"https://github.com/aio-libs.png","language":"Python","readme":"==================================\nAsync http client/server framework\n==================================\n\n.. image:: https://raw.githubusercontent.com/aio-libs/aiohttp/master/docs/aiohttp-plain.svg\n   :height: 64px\n   :width: 64px\n   :alt: aiohttp logo\n\n|\n\n.. image:: https://github.com/aio-libs/aiohttp/workflows/CI/badge.svg\n   :target: https://github.com/aio-libs/aiohttp/actions?query=workflow%3ACI\n   :alt: GitHub Actions status for master branch\n\n.. image:: https://codecov.io/gh/aio-libs/aiohttp/branch/master/graph/badge.svg\n   :target: https://codecov.io/gh/aio-libs/aiohttp\n   :alt: codecov.io status for master branch\n\n.. image:: https://badge.fury.io/py/aiohttp.svg\n   :target: https://pypi.org/project/aiohttp\n   :alt: Latest PyPI package version\n\n.. image:: https://img.shields.io/pypi/dm/aiohttp\n   :target: https://pypistats.org/packages/aiohttp\n   :alt: Downloads count\n\n.. image:: https://readthedocs.org/projects/aiohttp/badge/?version=latest\n   :target: https://docs.aiohttp.org/\n   :alt: Latest Read The Docs\n\n.. image:: https://img.shields.io/endpoint?url=https://codspeed.io/badge.json\n   :target: https://codspeed.io/aio-libs/aiohttp\n   :alt: Codspeed.io status for aiohttp\n\n\nKey Features\n============\n\n- Supports both client and server side of HTTP protocol.\n- Supports both client and server Web-Sockets out-of-the-box and avoids\n  Callback Hell.\n- Provides Web-server with middleware and pluggable routing.\n\n\nGetting started\n===============\n\nClient\n------\n\nTo get something from the web:\n\n.. code-block:: python\n\n  import aiohttp\n  import asyncio\n\n  async def main():\n\n      async with aiohttp.ClientSession() as session:\n          async with session.get('http://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\n  asyncio.run(main())\n\nThis prints:\n\n.. code-block::\n\n    Status: 200\n    Content-type: text/html; charset=utf-8\n    Body: \u003c!doctype html\u003e ...\n\nComing from `requests \u003chttps://requests.readthedocs.io/\u003e`_ ? Read `why we need so many lines \u003chttps://aiohttp.readthedocs.io/en/latest/http_request_lifecycle.html\u003e`_.\n\nServer\n------\n\nAn example using a simple server:\n\n.. code-block:: python\n\n    # examples/server_simple.py\n    from aiohttp import web\n\n    async def handle(request):\n        name = request.match_info.get('name', \"Anonymous\")\n        text = \"Hello, \" + name\n        return web.Response(text=text)\n\n    async def wshandle(request):\n        ws = web.WebSocketResponse()\n        await ws.prepare(request)\n\n        async for msg in ws:\n            if msg.type == web.WSMsgType.text:\n                await ws.send_str(\"Hello, {}\".format(msg.data))\n            elif msg.type == web.WSMsgType.binary:\n                await ws.send_bytes(msg.data)\n            elif msg.type == web.WSMsgType.close:\n                break\n\n        return ws\n\n\n    app = web.Application()\n    app.add_routes([web.get('/', handle),\n                    web.get('/echo', wshandle),\n                    web.get('/{name}', handle)])\n\n    if __name__ == '__main__':\n        web.run_app(app)\n\n\nDocumentation\n=============\n\nhttps://aiohttp.readthedocs.io/\n\n\nDemos\n=====\n\nhttps://github.com/aio-libs/aiohttp-demos\n\n\nExternal links\n==============\n\n* `Third party libraries\n  \u003chttp://aiohttp.readthedocs.io/en/latest/third_party.html\u003e`_\n* `Built with aiohttp\n  \u003chttp://aiohttp.readthedocs.io/en/latest/built_with.html\u003e`_\n* `Powered by aiohttp\n  \u003chttp://aiohttp.readthedocs.io/en/latest/powered_by.html\u003e`_\n\nFeel free to make a Pull Request for adding your link to these pages!\n\n\nCommunication channels\n======================\n\n*aio-libs Discussions*: https://github.com/aio-libs/aiohttp/discussions\n\n*Matrix*: `#aio-libs:matrix.org \u003chttps://matrix.to/#/#aio-libs:matrix.org\u003e`_\n\nWe support `Stack Overflow\n\u003chttps://stackoverflow.com/questions/tagged/aiohttp\u003e`_.\nPlease add *aiohttp* tag to your question there.\n\nRequirements\n============\n\n- multidict_\n- yarl_\n- frozenlist_\n\nOptionally you may install the aiodns_ library (highly recommended for sake of speed).\n\n.. _aiodns: https://pypi.python.org/pypi/aiodns\n.. _multidict: https://pypi.python.org/pypi/multidict\n.. _frozenlist: https://pypi.org/project/frozenlist/\n.. _yarl: https://pypi.python.org/pypi/yarl\n\nLicense\n=======\n\n``aiohttp`` is offered under the Apache 2 license.\n\n\nKeepsafe\n========\n\nThe aiohttp community would like to thank Keepsafe\n(https://www.getkeepsafe.com) for its support in the early days of\nthe project.\n\n\nSource code\n===========\n\nThe latest developer version is available in a GitHub repository:\nhttps://github.com/aio-libs/aiohttp\n\nBenchmarks\n==========\n\nIf you are interested in efficiency, the AsyncIO community maintains a\nlist of benchmarks on the official wiki:\nhttps://github.com/python/asyncio/wiki/Benchmarks\n\n--------\n\n.. image:: https://img.shields.io/matrix/aio-libs:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs%3Amatrix.org\u0026logo=matrix\u0026server_fqdn=matrix.org\u0026style=flat\n   :target: https://matrix.to/#/%23aio-libs:matrix.org\n   :alt: Matrix Room — #aio-libs:matrix.org\n\n.. image:: https://img.shields.io/matrix/aio-libs-space:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs-space%3Amatrix.org\u0026logo=matrix\u0026server_fqdn=matrix.org\u0026style=flat\n   :target: https://matrix.to/#/%23aio-libs-space:matrix.org\n   :alt: Matrix Space — #aio-libs-space:matrix.org\n\n.. image:: https://insights.linuxfoundation.org/api/badge/health-score?project=aiohttp\n   :target: https://insights.linuxfoundation.org/project/aiohttp\n   :alt: LFX Health Score\n","funding_links":["https://github.com/sponsors/asvetlov","https://github.com/sponsors/webknjaz","https://github.com/sponsors/Dreamsorcerer"],"categories":["Python","资源列表","HTTP Clients","接口工具","📡 HTTP Clients","\u003e 10K ⭐️","HarmonyOS","网络服务","Core Libraries","Micro-frameworks","📚 فهرست","Service Toolkits","Networking","Uncategorized","📦 Additional Python Libraries"],"sub_categories":["HTTP","Ruby","Windows Manager","网络服务_其他","Python","Async","شبکه","Uncategorized","Web \u0026 APIs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faio-libs%2Faiohttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faio-libs%2Faiohttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faio-libs%2Faiohttp/lists"}