You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

334 lines
12 KiB

4 years ago
  1. Metadata-Version: 2.1
  2. Name: aiohttp
  3. Version: 3.4.4
  4. Summary: Async http client/server framework (asyncio)
  5. Home-page: https://github.com/aio-libs/aiohttp
  6. Author: Nikolay Kim
  7. Author-email: fafhrd91@gmail.com
  8. Maintainer: Nikolay Kim <fafhrd91@gmail.com>, Andrew Svetlov <andrew.svetlov@gmail.com>
  9. Maintainer-email: aio-libs@googlegroups.com
  10. License: Apache 2
  11. Project-URL: Chat: Gitter, https://gitter.im/aio-libs/Lobby
  12. Project-URL: CI: AppVeyor, https://ci.appveyor.com/project/aio-libs/aiohttp
  13. Project-URL: CI: Circle, https://circleci.com/gh/aio-libs/aiohttp
  14. Project-URL: CI: Shippable, https://app.shippable.com/github/aio-libs/aiohttp
  15. Project-URL: CI: Travis, https://travis-ci.com/aio-libs/aiohttp
  16. Project-URL: Coverage: codecov, https://codecov.io/github/aio-libs/aiohttp
  17. Project-URL: Docs: RTD, https://docs.aiohttp.org
  18. Project-URL: GitHub: issues, https://github.com/aio-libs/aiohttp/issues
  19. Project-URL: GitHub: repo, https://github.com/aio-libs/aiohttp
  20. Platform: UNKNOWN
  21. Classifier: License :: OSI Approved :: Apache Software License
  22. Classifier: Intended Audience :: Developers
  23. Classifier: Programming Language :: Python
  24. Classifier: Programming Language :: Python :: 3
  25. Classifier: Programming Language :: Python :: 3.5
  26. Classifier: Programming Language :: Python :: 3.6
  27. Classifier: Programming Language :: Python :: 3.7
  28. Classifier: Development Status :: 5 - Production/Stable
  29. Classifier: Operating System :: POSIX
  30. Classifier: Operating System :: MacOS :: MacOS X
  31. Classifier: Operating System :: Microsoft :: Windows
  32. Classifier: Topic :: Internet :: WWW/HTTP
  33. Classifier: Framework :: AsyncIO
  34. Requires-Python: >=3.5.3
  35. Requires-Dist: attrs (>=17.3.0)
  36. Requires-Dist: chardet (<4.0,>=2.0)
  37. Requires-Dist: multidict (<5.0,>=4.0)
  38. Requires-Dist: async-timeout (<4.0,>=3.0)
  39. Requires-Dist: yarl (<2.0,>=1.0)
  40. Requires-Dist: idna-ssl (>=1.0); python_version < "3.7"
  41. ==================================
  42. Async http client/server framework
  43. ==================================
  44. .. image:: https://raw.githubusercontent.com/aio-libs/aiohttp/master/docs/_static/aiohttp-icon-128x128.png
  45. :height: 64px
  46. :width: 64px
  47. :alt: aiohttp logo
  48. |
  49. .. image:: https://travis-ci.com/aio-libs/aiohttp.svg?branch=master
  50. :target: https://travis-ci.com/aio-libs/aiohttp
  51. :align: right
  52. :alt: Travis status for master branch
  53. .. image:: https://ci.appveyor.com/api/projects/status/tnddy9k6pphl8w7k/branch/master?svg=true
  54. :target: https://ci.appveyor.com/project/aio-libs/aiohttp
  55. :align: right
  56. :alt: AppVeyor status for master branch
  57. .. image:: https://codecov.io/gh/aio-libs/aiohttp/branch/master/graph/badge.svg
  58. :target: https://codecov.io/gh/aio-libs/aiohttp
  59. :alt: codecov.io status for master branch
  60. .. image:: https://badge.fury.io/py/aiohttp.svg
  61. :target: https://pypi.org/project/aiohttp
  62. :alt: Latest PyPI package version
  63. .. image:: https://readthedocs.org/projects/aiohttp/badge/?version=latest
  64. :target: http://docs.aiohttp.org/
  65. :alt: Latest Read The Docs
  66. .. image:: https://badges.gitter.im/Join%20Chat.svg
  67. :target: https://gitter.im/aio-libs/Lobby
  68. :alt: Chat on Gitter
  69. Key Features
  70. ============
  71. - Supports both client and server side of HTTP protocol.
  72. - Supports both client and server Web-Sockets out-of-the-box without the
  73. Callback Hell.
  74. - Web-server has middlewares and pluggable routing.
  75. Getting started
  76. ===============
  77. Client
  78. ------
  79. To retrieve something from the web:
  80. .. code-block:: python
  81. import aiohttp
  82. import asyncio
  83. async def fetch(session, url):
  84. async with session.get(url) as response:
  85. return await response.text()
  86. async def main():
  87. async with aiohttp.ClientSession() as session:
  88. html = await fetch(session, 'http://python.org')
  89. print(html)
  90. if __name__ == '__main__':
  91. loop = asyncio.get_event_loop()
  92. loop.run_until_complete(main())
  93. Server
  94. ------
  95. This is simple usage example:
  96. .. code-block:: python
  97. from aiohttp import web
  98. async def handle(request):
  99. name = request.match_info.get('name', "Anonymous")
  100. text = "Hello, " + name
  101. return web.Response(text=text)
  102. async def wshandle(request):
  103. ws = web.WebSocketResponse()
  104. await ws.prepare(request)
  105. async for msg in ws:
  106. if msg.type == web.WSMsgType.text:
  107. await ws.send_str("Hello, {}".format(msg.data))
  108. elif msg.type == web.WSMsgType.binary:
  109. await ws.send_bytes(msg.data)
  110. elif msg.type == web.WSMsgType.close:
  111. break
  112. return ws
  113. app = web.Application()
  114. app.add_routes([web.get('/', handle),
  115. web.get('/echo', wshandle),
  116. web.get('/{name}', handle)])
  117. web.run_app(app)
  118. Documentation
  119. =============
  120. https://aiohttp.readthedocs.io/
  121. Demos
  122. =====
  123. https://github.com/aio-libs/aiohttp-demos
  124. External links
  125. ==============
  126. * `Third party libraries
  127. <http://aiohttp.readthedocs.io/en/latest/third_party.html>`_
  128. * `Built with aiohttp
  129. <http://aiohttp.readthedocs.io/en/latest/built_with.html>`_
  130. * `Powered by aiohttp
  131. <http://aiohttp.readthedocs.io/en/latest/powered_by.html>`_
  132. Feel free to make a Pull Request for adding your link to these pages!
  133. Communication channels
  134. ======================
  135. *aio-libs* google group: https://groups.google.com/forum/#!forum/aio-libs
  136. Feel free to post your questions and ideas here.
  137. *gitter chat* https://gitter.im/aio-libs/Lobby
  138. We support `Stack Overflow
  139. <https://stackoverflow.com/questions/tagged/aiohttp>`_.
  140. Please add *aiohttp* tag to your question there.
  141. Requirements
  142. ============
  143. - Python >= 3.5.3
  144. - async-timeout_
  145. - attrs_
  146. - chardet_
  147. - multidict_
  148. - yarl_
  149. Optionally you may install the cChardet_ and aiodns_ libraries (highly
  150. recommended for sake of speed).
  151. .. _chardet: https://pypi.python.org/pypi/chardet
  152. .. _aiodns: https://pypi.python.org/pypi/aiodns
  153. .. _attrs: https://github.com/python-attrs/attrs
  154. .. _multidict: https://pypi.python.org/pypi/multidict
  155. .. _yarl: https://pypi.python.org/pypi/yarl
  156. .. _async-timeout: https://pypi.python.org/pypi/async_timeout
  157. .. _cChardet: https://pypi.python.org/pypi/cchardet
  158. License
  159. =======
  160. ``aiohttp`` is offered under the Apache 2 license.
  161. Keepsafe
  162. ========
  163. The aiohttp community would like to thank Keepsafe
  164. (https://www.getkeepsafe.com) for it's support in the early days of
  165. the project.
  166. Source code
  167. ===========
  168. The latest developer version is available in a github repository:
  169. https://github.com/aio-libs/aiohttp
  170. Benchmarks
  171. ==========
  172. If you are interested in by efficiency, AsyncIO community maintains a
  173. list of benchmarks on the official wiki:
  174. https://github.com/python/asyncio/wiki/Benchmarks
  175. =========
  176. Changelog
  177. =========
  178. ..
  179. You should *NOT* be adding new change log entries to this file, this
  180. file is managed by towncrier. You *may* edit previous change logs to
  181. fix problems like typo corrections or such.
  182. To add a new change log entry, please see
  183. https://pip.pypa.io/en/latest/development/#adding-a-news-entry
  184. we named the news folder "changes".
  185. WARNING: Don't drop the next directive!
  186. .. towncrier release notes start
  187. 3.4.4 (2018-09-05)
  188. ==================
  189. - Fix installation from sources when compiling toolkit is not available (`#3241 <https://github.com/aio-libs/aiohttp/pull/3241>`_)
  190. 3.4.3 (2018-09-04)
  191. ==================
  192. - Add ``app.pre_frozen`` state to properly handle startup signals in sub-applications. (`#3237 <https://github.com/aio-libs/aiohttp/pull/3237>`_)
  193. 3.4.2 (2018-09-01)
  194. ==================
  195. - Fix ``iter_chunks`` type annotation (`#3230 <https://github.com/aio-libs/aiohttp/pull/3230>`_)
  196. 3.4.1 (2018-08-28)
  197. ==================
  198. - Fix empty header parsing regression. (`#3218 <https://github.com/aio-libs/aiohttp/pull/3218>`_)
  199. - Fix BaseRequest.raw_headers doc. (`#3215 <https://github.com/aio-libs/aiohttp/pull/3215>`_)
  200. - Fix documentation building on ReadTheDocs (`#3221 <https://github.com/aio-libs/aiohttp/pull/3221>`_)
  201. 3.4.0 (2018-08-25)
  202. ==================
  203. Features
  204. --------
  205. - Add type hints (`#3049 <https://github.com/aio-libs/aiohttp/pull/3049>`_)
  206. - Add ``raise_for_status`` request parameter (`#3073 <https://github.com/aio-libs/aiohttp/pull/3073>`_)
  207. - Add type hints to HTTP client (`#3092 <https://github.com/aio-libs/aiohttp/pull/3092>`_)
  208. - Minor server optimizations (`#3095 <https://github.com/aio-libs/aiohttp/pull/3095>`_)
  209. - Preserve the cause when `HTTPException` is raised from another exception. (`#3096 <https://github.com/aio-libs/aiohttp/pull/3096>`_)
  210. - Add `close_boundary` option in `MultipartWriter.write` method. Support streaming (`#3104 <https://github.com/aio-libs/aiohttp/pull/3104>`_)
  211. - Added a ``remove_slash`` option to the ``normalize_path_middleware`` factory. (`#3173 <https://github.com/aio-libs/aiohttp/pull/3173>`_)
  212. - The class `AbstractRouteDef` is importable from `aiohttp.web`. (`#3183 <https://github.com/aio-libs/aiohttp/pull/3183>`_)
  213. Bugfixes
  214. --------
  215. - Prevent double closing when client connection is released before the
  216. last ``data_received()`` callback. (`#3031 <https://github.com/aio-libs/aiohttp/pull/3031>`_)
  217. - Make redirect with `normalize_path_middleware` work when using url encoded paths. (`#3051 <https://github.com/aio-libs/aiohttp/pull/3051>`_)
  218. - Postpone web task creation to connection establishment. (`#3052 <https://github.com/aio-libs/aiohttp/pull/3052>`_)
  219. - Fix ``sock_read`` timeout. (`#3053 <https://github.com/aio-libs/aiohttp/pull/3053>`_)
  220. - When using a server-request body as the `data=` argument of a client request, iterate over the content with `readany` instead of `readline` to avoid `Line too long` errors. (`#3054 <https://github.com/aio-libs/aiohttp/pull/3054>`_)
  221. - fix `UrlDispatcher` has no attribute `add_options`, add `web.options` (`#3062 <https://github.com/aio-libs/aiohttp/pull/3062>`_)
  222. - correct filename in content-disposition with multipart body (`#3064 <https://github.com/aio-libs/aiohttp/pull/3064>`_)
  223. - Many HTTP proxies has buggy keepalive support.
  224. Let's not reuse connection but close it after processing every response. (`#3070 <https://github.com/aio-libs/aiohttp/pull/3070>`_)
  225. - raise 413 "Payload Too Large" rather than raising ValueError in request.post()
  226. Add helpful debug message to 413 responses (`#3087 <https://github.com/aio-libs/aiohttp/pull/3087>`_)
  227. - Fix `StreamResponse` equality, now that they are `MutableMapping` objects. (`#3100 <https://github.com/aio-libs/aiohttp/pull/3100>`_)
  228. - Fix server request objects comparison (`#3116 <https://github.com/aio-libs/aiohttp/pull/3116>`_)
  229. - Do not hang on `206 Partial Content` response with `Content-Encoding: gzip` (`#3123 <https://github.com/aio-libs/aiohttp/pull/3123>`_)
  230. - Fix timeout precondition checkers (`#3145 <https://github.com/aio-libs/aiohttp/pull/3145>`_)
  231. Improved Documentation
  232. ----------------------
  233. - Add a new FAQ entry that clarifies that you should not reuse response
  234. objects in middleware functions. (`#3020 <https://github.com/aio-libs/aiohttp/pull/3020>`_)
  235. - Add FAQ section "Why is creating a ClientSession outside of an event loop dangerous?" (`#3072 <https://github.com/aio-libs/aiohttp/pull/3072>`_)
  236. - Fix link to Rambler (`#3115 <https://github.com/aio-libs/aiohttp/pull/3115>`_)
  237. - Fix TCPSite documentation on the Server Reference page. (`#3146 <https://github.com/aio-libs/aiohttp/pull/3146>`_)
  238. - Fix documentation build configuration file for Windows. (`#3147 <https://github.com/aio-libs/aiohttp/pull/3147>`_)
  239. - Remove no longer existing lingering_timeout parameter of Application.make_handler from documentation. (`#3151 <https://github.com/aio-libs/aiohttp/pull/3151>`_)
  240. - Mention that ``app.make_handler`` is deprecated, recommend to use runners
  241. API instead. (`#3157 <https://github.com/aio-libs/aiohttp/pull/3157>`_)
  242. Deprecations and Removals
  243. -------------------------
  244. - Drop ``loop.current_task()`` from ``helpers.current_task()`` (`#2826 <https://github.com/aio-libs/aiohttp/pull/2826>`_)
  245. - Drop ``reader`` parameter from ``request.multipart()``. (`#3090 <https://github.com/aio-libs/aiohttp/pull/3090>`_)