METADATA 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. Metadata-Version: 2.4
  2. Name: aiohttp
  3. Version: 3.13.3
  4. Summary: Async http client/server framework (asyncio)
  5. Maintainer-email: aiohttp team <team@aiohttp.org>
  6. License: Apache-2.0 AND MIT
  7. Project-URL: Homepage, https://github.com/aio-libs/aiohttp
  8. Project-URL: Chat: Matrix, https://matrix.to/#/#aio-libs:matrix.org
  9. Project-URL: Chat: Matrix Space, https://matrix.to/#/#aio-libs-space:matrix.org
  10. Project-URL: CI: GitHub Actions, https://github.com/aio-libs/aiohttp/actions?query=workflow%3ACI
  11. Project-URL: Coverage: codecov, https://codecov.io/github/aio-libs/aiohttp
  12. Project-URL: Docs: Changelog, https://docs.aiohttp.org/en/stable/changes.html
  13. Project-URL: Docs: RTD, https://docs.aiohttp.org
  14. Project-URL: GitHub: issues, https://github.com/aio-libs/aiohttp/issues
  15. Project-URL: GitHub: repo, https://github.com/aio-libs/aiohttp
  16. Classifier: Development Status :: 5 - Production/Stable
  17. Classifier: Framework :: AsyncIO
  18. Classifier: Intended Audience :: Developers
  19. Classifier: Operating System :: POSIX
  20. Classifier: Operating System :: MacOS :: MacOS X
  21. Classifier: Operating System :: Microsoft :: Windows
  22. Classifier: Programming Language :: Python
  23. Classifier: Programming Language :: Python :: 3
  24. Classifier: Programming Language :: Python :: 3.9
  25. Classifier: Programming Language :: Python :: 3.10
  26. Classifier: Programming Language :: Python :: 3.11
  27. Classifier: Programming Language :: Python :: 3.12
  28. Classifier: Programming Language :: Python :: 3.13
  29. Classifier: Programming Language :: Python :: 3.14
  30. Classifier: Topic :: Internet :: WWW/HTTP
  31. Requires-Python: >=3.9
  32. Description-Content-Type: text/x-rst
  33. License-File: LICENSE.txt
  34. License-File: vendor/llhttp/LICENSE
  35. Requires-Dist: aiohappyeyeballs>=2.5.0
  36. Requires-Dist: aiosignal>=1.4.0
  37. Requires-Dist: async-timeout<6.0,>=4.0; python_version < "3.11"
  38. Requires-Dist: attrs>=17.3.0
  39. Requires-Dist: frozenlist>=1.1.1
  40. Requires-Dist: multidict<7.0,>=4.5
  41. Requires-Dist: propcache>=0.2.0
  42. Requires-Dist: yarl<2.0,>=1.17.0
  43. Provides-Extra: speedups
  44. Requires-Dist: aiodns>=3.3.0; extra == "speedups"
  45. Requires-Dist: Brotli>=1.2; platform_python_implementation == "CPython" and extra == "speedups"
  46. Requires-Dist: brotlicffi>=1.2; platform_python_implementation != "CPython" and extra == "speedups"
  47. Requires-Dist: backports.zstd; (platform_python_implementation == "CPython" and python_version < "3.14") and extra == "speedups"
  48. Dynamic: license-file
  49. ==================================
  50. Async http client/server framework
  51. ==================================
  52. .. image:: https://raw.githubusercontent.com/aio-libs/aiohttp/master/docs/aiohttp-plain.svg
  53. :height: 64px
  54. :width: 64px
  55. :alt: aiohttp logo
  56. |
  57. .. image:: https://github.com/aio-libs/aiohttp/workflows/CI/badge.svg
  58. :target: https://github.com/aio-libs/aiohttp/actions?query=workflow%3ACI
  59. :alt: GitHub Actions status for master branch
  60. .. image:: https://codecov.io/gh/aio-libs/aiohttp/branch/master/graph/badge.svg
  61. :target: https://codecov.io/gh/aio-libs/aiohttp
  62. :alt: codecov.io status for master branch
  63. .. image:: https://badge.fury.io/py/aiohttp.svg
  64. :target: https://pypi.org/project/aiohttp
  65. :alt: Latest PyPI package version
  66. .. image:: https://img.shields.io/pypi/dm/aiohttp
  67. :target: https://pypistats.org/packages/aiohttp
  68. :alt: Downloads count
  69. .. image:: https://readthedocs.org/projects/aiohttp/badge/?version=latest
  70. :target: https://docs.aiohttp.org/
  71. :alt: Latest Read The Docs
  72. .. image:: https://img.shields.io/endpoint?url=https://codspeed.io/badge.json
  73. :target: https://codspeed.io/aio-libs/aiohttp
  74. :alt: Codspeed.io status for aiohttp
  75. Key Features
  76. ============
  77. - Supports both client and server side of HTTP protocol.
  78. - Supports both client and server Web-Sockets out-of-the-box and avoids
  79. Callback Hell.
  80. - Provides Web-server with middleware and pluggable routing.
  81. Getting started
  82. ===============
  83. Client
  84. ------
  85. To get something from the web:
  86. .. code-block:: python
  87. import aiohttp
  88. import asyncio
  89. async def main():
  90. async with aiohttp.ClientSession() as session:
  91. async with session.get('http://python.org') as response:
  92. print("Status:", response.status)
  93. print("Content-type:", response.headers['content-type'])
  94. html = await response.text()
  95. print("Body:", html[:15], "...")
  96. asyncio.run(main())
  97. This prints:
  98. .. code-block::
  99. Status: 200
  100. Content-type: text/html; charset=utf-8
  101. Body: <!doctype html> ...
  102. Coming from `requests <https://requests.readthedocs.io/>`_ ? Read `why we need so many lines <https://aiohttp.readthedocs.io/en/latest/http_request_lifecycle.html>`_.
  103. Server
  104. ------
  105. An example using a simple server:
  106. .. code-block:: python
  107. # examples/server_simple.py
  108. from aiohttp import web
  109. async def handle(request):
  110. name = request.match_info.get('name', "Anonymous")
  111. text = "Hello, " + name
  112. return web.Response(text=text)
  113. async def wshandle(request):
  114. ws = web.WebSocketResponse()
  115. await ws.prepare(request)
  116. async for msg in ws:
  117. if msg.type == web.WSMsgType.text:
  118. await ws.send_str("Hello, {}".format(msg.data))
  119. elif msg.type == web.WSMsgType.binary:
  120. await ws.send_bytes(msg.data)
  121. elif msg.type == web.WSMsgType.close:
  122. break
  123. return ws
  124. app = web.Application()
  125. app.add_routes([web.get('/', handle),
  126. web.get('/echo', wshandle),
  127. web.get('/{name}', handle)])
  128. if __name__ == '__main__':
  129. web.run_app(app)
  130. Documentation
  131. =============
  132. https://aiohttp.readthedocs.io/
  133. Demos
  134. =====
  135. https://github.com/aio-libs/aiohttp-demos
  136. External links
  137. ==============
  138. * `Third party libraries
  139. <http://aiohttp.readthedocs.io/en/latest/third_party.html>`_
  140. * `Built with aiohttp
  141. <http://aiohttp.readthedocs.io/en/latest/built_with.html>`_
  142. * `Powered by aiohttp
  143. <http://aiohttp.readthedocs.io/en/latest/powered_by.html>`_
  144. Feel free to make a Pull Request for adding your link to these pages!
  145. Communication channels
  146. ======================
  147. *aio-libs Discussions*: https://github.com/aio-libs/aiohttp/discussions
  148. *Matrix*: `#aio-libs:matrix.org <https://matrix.to/#/#aio-libs:matrix.org>`_
  149. We support `Stack Overflow
  150. <https://stackoverflow.com/questions/tagged/aiohttp>`_.
  151. Please add *aiohttp* tag to your question there.
  152. Requirements
  153. ============
  154. - attrs_
  155. - multidict_
  156. - yarl_
  157. - frozenlist_
  158. Optionally you may install the aiodns_ library (highly recommended for sake of speed).
  159. .. _aiodns: https://pypi.python.org/pypi/aiodns
  160. .. _attrs: https://github.com/python-attrs/attrs
  161. .. _multidict: https://pypi.python.org/pypi/multidict
  162. .. _frozenlist: https://pypi.org/project/frozenlist/
  163. .. _yarl: https://pypi.python.org/pypi/yarl
  164. .. _async-timeout: https://pypi.python.org/pypi/async_timeout
  165. License
  166. =======
  167. ``aiohttp`` is offered under the Apache 2 license.
  168. Keepsafe
  169. ========
  170. The aiohttp community would like to thank Keepsafe
  171. (https://www.getkeepsafe.com) for its support in the early days of
  172. the project.
  173. Source code
  174. ===========
  175. The latest developer version is available in a GitHub repository:
  176. https://github.com/aio-libs/aiohttp
  177. Benchmarks
  178. ==========
  179. If you are interested in efficiency, the AsyncIO community maintains a
  180. list of benchmarks on the official wiki:
  181. https://github.com/python/asyncio/wiki/Benchmarks
  182. --------
  183. .. image:: https://img.shields.io/matrix/aio-libs:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat
  184. :target: https://matrix.to/#/%23aio-libs:matrix.org
  185. :alt: Matrix Room — #aio-libs:matrix.org
  186. .. image:: https://img.shields.io/matrix/aio-libs-space:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs-space%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat
  187. :target: https://matrix.to/#/%23aio-libs-space:matrix.org
  188. :alt: Matrix Space — #aio-libs-space:matrix.org
  189. .. image:: https://insights.linuxfoundation.org/api/badge/health-score?project=aiohttp
  190. :target: https://insights.linuxfoundation.org/project/aiohttp
  191. :alt: LFX Health Score