Compatibility API between asyncio/Twisted/Trollius
Maintained. Last release 5 months ago, commits in 6 of the last 26 weeks. Weaker on contributor spread and security practices.
pip install txaiotxaio
txaio is a helper library for writing code that runs unmodified on both Twisted and asyncio / Trollius.
This is like six, but for wrapping over differences between Twisted and asyncio so one can write code that runs unmodified on both (aka source code compatibility). In other words: your users can choose if they want asyncio or Twisted as a dependency.
Note that, with this approach, user code runs under the native event loop of either Twisted or asyncio. This is different from attaching either one's event loop to the other using some event loop adapter.
Platform support
txaio runs on CPython 3.6+ and PyPy 3, on top of Twisted or asyncio. Specifically, txaio is tested on the following platforms:
- CPython 3.6 and 3.9 on Twisted 18.7, 19.10, trunk and on asyncio (stdlib)
- PyPy 3.6 an 3.7 on Twisted 18.7, 19.10, trunk and on asyncio (stdlib)
> 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+.