README.rst 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. =========
  2. aiosignal
  3. =========
  4. .. image:: https://github.com/aio-libs/aiosignal/workflows/CI/badge.svg
  5. :target: https://github.com/aio-libs/aiosignal/actions?query=workflow%3ACI
  6. :alt: GitHub status for master branch
  7. .. image:: https://codecov.io/gh/aio-libs/aiosignal/branch/master/graph/badge.svg
  8. :target: https://codecov.io/gh/aio-libs/aiosignal
  9. :alt: codecov.io status for master branch
  10. .. image:: https://badge.fury.io/py/aiosignal.svg
  11. :target: https://pypi.org/project/aiosignal
  12. :alt: Latest PyPI package version
  13. .. image:: https://readthedocs.org/projects/aiosignal/badge/?version=latest
  14. :target: https://aiosignal.readthedocs.io/
  15. :alt: Latest Read The Docs
  16. .. image:: https://img.shields.io/discourse/topics?server=https%3A%2F%2Faio-libs.discourse.group%2F
  17. :target: https://aio-libs.discourse.group/
  18. :alt: Discourse group for io-libs
  19. .. image:: https://badges.gitter.im/Join%20Chat.svg
  20. :target: https://gitter.im/aio-libs/Lobby
  21. :alt: Chat on Gitter
  22. Introduction
  23. ============
  24. A project to manage callbacks in `asyncio` projects.
  25. ``Signal`` is a list of registered asynchronous callbacks.
  26. The signal's life-cycle has two stages: after creation its content
  27. could be filled by using standard list operations: ``sig.append()``
  28. etc.
  29. After you call ``sig.freeze()`` the signal is *frozen*: adding, removing
  30. and dropping callbacks is forbidden.
  31. The only available operation is calling the previously registered
  32. callbacks by using ``await sig.send(data)``.
  33. For concrete usage examples see the `Signals
  34. <https://docs.aiohttp.org/en/stable/web_advanced.html#aiohttp-web-signals>
  35. section of the `Web Server Advanced
  36. <https://docs.aiohttp.org/en/stable/web_advanced.html>` chapter of the `aiohttp
  37. documentation`_.
  38. Installation
  39. ------------
  40. ::
  41. $ pip install aiosignal
  42. The library requires Python 3.6 or newer.
  43. Documentation
  44. =============
  45. https://aiosignal.readthedocs.io/
  46. Communication channels
  47. ======================
  48. *gitter chat* https://gitter.im/aio-libs/Lobby
  49. Requirements
  50. ============
  51. - Python >= 3.6
  52. - frozenlist >= 1.0.0
  53. License
  54. =======
  55. ``aiosignal`` is offered under the Apache 2 license.
  56. Source code
  57. ===========
  58. The project is hosted on GitHub_
  59. Please file an issue in the `bug tracker
  60. <https://github.com/aio-libs/aiosignal/issues>`_ if you have found a bug
  61. or have some suggestions to improve the library.
  62. .. _GitHub: https://github.com/aio-libs/aiosignal
  63. .. _aiohttp documentation: https://docs.aiohttp.org/