Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
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.

METADATA 5.3KB

1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. Metadata-Version: 2.1
  2. Name: txaio
  3. Version: 23.1.1
  4. Summary: Compatibility API between asyncio/Twisted/Trollius
  5. Home-page: https://github.com/crossbario/txaio
  6. Author: typedef int GmbH
  7. Author-email: autobahnws@googlegroups.com
  8. License: MIT License
  9. Keywords: asyncio twisted trollius coroutine
  10. Platform: Any
  11. Classifier: License :: OSI Approved :: MIT License
  12. Classifier: Development Status :: 5 - Production/Stable
  13. Classifier: Environment :: Console
  14. Classifier: Framework :: Twisted
  15. Classifier: Intended Audience :: Developers
  16. Classifier: Operating System :: OS Independent
  17. Classifier: Programming Language :: Python
  18. Classifier: Programming Language :: Python :: 3
  19. Classifier: Programming Language :: Python :: 3.7
  20. Classifier: Programming Language :: Python :: 3.8
  21. Classifier: Programming Language :: Python :: 3.9
  22. Classifier: Programming Language :: Python :: 3.10
  23. Classifier: Programming Language :: Python :: 3.11
  24. Classifier: Programming Language :: Python :: Implementation :: CPython
  25. Classifier: Programming Language :: Python :: Implementation :: PyPy
  26. Classifier: Topic :: Software Development :: Libraries
  27. Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
  28. Requires-Python: >=3.7
  29. License-File: LICENSE
  30. Provides-Extra: all
  31. Requires-Dist: zope.interface (>=5.2.0) ; extra == 'all'
  32. Requires-Dist: twisted (>=20.3.0) ; extra == 'all'
  33. Provides-Extra: asyncio
  34. Provides-Extra: dev
  35. Requires-Dist: wheel ; extra == 'dev'
  36. Requires-Dist: pytest (>=2.6.4) ; extra == 'dev'
  37. Requires-Dist: pytest-cov (>=1.8.1) ; extra == 'dev'
  38. Requires-Dist: pep8 (>=1.6.2) ; extra == 'dev'
  39. Requires-Dist: sphinx (>=1.2.3) ; extra == 'dev'
  40. Requires-Dist: pyenchant (>=1.6.6) ; extra == 'dev'
  41. Requires-Dist: sphinxcontrib-spelling (>=2.1.2) ; extra == 'dev'
  42. Requires-Dist: sphinx-rtd-theme (>=0.1.9) ; extra == 'dev'
  43. Requires-Dist: tox (>=2.1.1) ; extra == 'dev'
  44. Requires-Dist: twine (>=1.6.5) ; extra == 'dev'
  45. Requires-Dist: tox-gh-actions (>=2.2.0) ; extra == 'dev'
  46. Provides-Extra: twisted
  47. Requires-Dist: zope.interface (>=5.2.0) ; extra == 'twisted'
  48. Requires-Dist: twisted (>=20.3.0) ; extra == 'twisted'
  49. txaio
  50. =====
  51. | |Version| |Build| |Deploy| |Coverage| |Docs|
  52. --------------
  53. **txaio** is a helper library for writing code that runs unmodified on
  54. both `Twisted <https://twistedmatrix.com/>`_ and `asyncio <https://docs.python.org/3/library/asyncio.html>`_ / `Trollius <http://trollius.readthedocs.org/en/latest/index.html>`_.
  55. This is like `six <http://pythonhosted.org/six/>`_, but for wrapping
  56. over differences between Twisted and asyncio so one can write code
  57. that runs unmodified on both (aka *source code compatibility*). In
  58. other words: your *users* can choose if they want asyncio **or** Twisted
  59. as a dependency.
  60. Note that, with this approach, user code **runs under the native event
  61. loop of either Twisted or asyncio**. This is different from attaching
  62. either one's event loop to the other using some event loop adapter.
  63. Platform support
  64. ----------------
  65. **txaio** runs on CPython 3.6+ and PyPy 3, on top of *Twisted* or *asyncio*. Specifically, **txaio** is tested on the following platforms:
  66. * CPython 3.6 and 3.9 on Twisted 18.7, 19.10, trunk and on asyncio (stdlib)
  67. * PyPy 3.6 an 3.7 on Twisted 18.7, 19.10, trunk and on asyncio (stdlib)
  68. > Note: txaio up to version 18.8.1 also supported Python 2.7 and Python 3.4. Beginning with release v20.1.1, txaio only supports Python 3.5+. Beginning with release v20.12.1, txaio only supports Python 3.6+.
  69. How it works
  70. ------------
  71. Instead of directly importing, instantiating and using ``Deferred``
  72. (for Twisted) or ``Future`` (for asyncio) objects, **txaio** provides
  73. helper-functions to do that for you, as well as associated things like
  74. adding callbacks or errbacks.
  75. This obviously changes the style of your code, but then you can choose
  76. at runtime (or import time) which underlying event-loop to use. This
  77. means you can write **one** code-base that can run on Twisted *or*
  78. asyncio (without a Twisted dependency) as you or your users see fit.
  79. Code like the following can then run on *either* system:
  80. .. sourcecode:: python
  81. import txaio
  82. txaio.use_twisted() # or .use_asyncio()
  83. f0 = txaio.create_future()
  84. f1 = txaio.as_future(some_func, 1, 2, key='word')
  85. txaio.add_callbacks(f0, callback, errback)
  86. txaio.add_callbacks(f1, callback, errback)
  87. # ...
  88. txaio.resolve(f0, "value")
  89. txaio.reject(f1, RuntimeError("it failed"))
  90. Please refer to the `documentation <https://txaio.readthedocs.io/en/latest/>`_ for description and usage of the library features.
  91. .. |Version| image:: https://img.shields.io/pypi/v/txaio.svg
  92. :target: https://pypi.python.org/pypi/txaio
  93. :alt: Version
  94. .. |Build| image:: https://github.com/crossbario/txaio/workflows/main/badge.svg
  95. :target: https://github.com/crossbario/txaio/actions?query=workflow%3Amain
  96. :alt: Build Workflow
  97. .. |Deploy| image:: https://github.com/crossbario/txaio/workflows/deploy/badge.svg
  98. :target: https://github.com/crossbario/txaio/actions?query=workflow%3Adeploy
  99. :alt: Deploy Workflow
  100. .. |Coverage| image:: https://codecov.io/github/crossbario/txaio/coverage.svg?branch=master
  101. :target: https://codecov.io/github/crossbario/txaio
  102. :alt: Coverage
  103. .. |Docs| image:: https://readthedocs.org/projects/txaio/badge/?version=latest
  104. :target: https://txaio.readthedocs.io/en/latest/
  105. :alt: Docs