Description
# txaio [](https://pypi.python.org/pypi/txaio) [](https://pypi.python.org/pypi/txaio) [](https://github.com/crossbario/txaio/actions?query=workflow%3Amain) [](https://txaio.readthedocs.io/en/latest/) [](https://github.com/crossbario/txaio/blob/master/LICENSE) [](https://pypi.python.org/pypi/txaio) ------------------------------------------------------------------------ **txaio** is a helper library for writing code that runs unmodified on both [Twisted](https://twistedmatrix.com/) and [asyncio](https://docs.python.org/3/library/asyncio.html) / [Trollius](http://trollius.readthedocs.org/en/latest/index.html). This is like [six](http://pythonhosted.org/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+. ## How it works Instead of directly importing, instantiating and using `Deferred` (for Twisted) or `Future` (for asyncio) objects, **txaio** provides helper-functions to do that for you, as well as associated things like adding callbacks or errbacks. This obviously changes the style of your code, but then you can choose at runtime (or import time) which underlying event-loop to use. This means you can write **one** code-base that can run on Twisted *or* asyncio (without a Twisted dependency) as you or your users see fit. Code like the following can then run on *either* system: ```python import txaio txaio.use_twisted() # or .use_asyncio() f0 = txaio.create_future() f1 = txaio.as_future(some_func, 1, 2, key='word') txaio.add_callbacks(f0, callback, errback) txaio.add_callbacks(f1, callback, errback) # ... txaio.resolve(f0, "value") txaio.reject(f1, RuntimeError("it failed")) ``` Please refer to the [documentation](https://txaio.readthedocs.io/en/latest/) for description and usage of the library features. ## AI Policy > **IMPORTANT: A Note on Upcoming Policy Changes Regarding AI-Assisted Content** > > Up to and including release **v25.6.1**, this project contains no code > or documentation generated with the assistance of AI tools. This version > represents the final release under our historical contribution policy. > Starting with future versions (*after* release v25.6.1), our contribution policy > will change. Subsequent releases **MAY** contain code or documentation > created with AI assistance. We urge all users and contributors to review our [AI Policy](https://github.com/crossbario/txaio/blob/master/AI_POLICY.md). This document details: - The rules and warranties required for all future contributions. - The potential intellectual property implications for the project and its users. This policy was established following an open community discussion, which you can review on [GitHub issue \#1663](https://github.com/crossbario/autobahn-python/issues/1663). We are providing this transparent notice to enable you to make an informed decision. If our new AI policy is incompatible with your own (or your organization's) development practices or risk tolerance, please take this into consideration when deciding whether to upgrade beyond version v25.6.1.
Release History
| Version | Changes | Urgency | Date |
|---|---|---|---|
| 25.12.2 | Imported from PyPI (25.12.2) | Low | 4/21/2026 |
| master-202512091508 | ## txaio Development Build **Release:** master-202512091508 **Type:** nightly **Branch:** master **Commit:** 6205af2b069a8ec2c570eaaa9cd4ee42bac7c6c4 This is an automated development/nightly build for testing purposes. **Installation:** ```bash pip install https://github.com/crossbario/txaio/releases/download/master-202512091508/txaio-*.whl ``` **Files:** - Universal wheel (py3-none-any) - Source distribution (.tar.gz) - Documentation archive - SHA256 checksums (CHECKSUMS-ALL.sha256) ⚠️ Th | Low | 12/9/2025 |
| master-202512090505 | ## txaio Development Build **Release:** master-202512090505 **Type:** nightly **Branch:** master **Commit:** 775e6e9bf0b0a8b94f1508930588466d5305c2d2 This is an automated development/nightly build for testing purposes. **Installation:** ```bash pip install https://github.com/crossbario/txaio/releases/download/master-202512090505/txaio-*.whl ``` **Files:** - Universal wheel (py3-none-any) - Source distribution (.tar.gz) - Documentation archive - SHA256 checksums (CHECKSUMS-ALL.sha256) ⚠️ Th | Low | 12/9/2025 |
| master-202512090450 | ## txaio Development Build **Release:** master-202512090450 **Type:** nightly **Branch:** master **Commit:** f265087f13f35bb84bec07e62f8f5e962890360e This is an automated development/nightly build for testing purposes. **Installation:** ```bash pip install https://github.com/crossbario/txaio/releases/download/master-202512090450/txaio-*.whl ``` **Files:** - Universal wheel (py3-none-any) - Source distribution (.tar.gz) - Documentation archive - SHA256 checksums (CHECKSUMS-ALL.sha256) ⚠️ Th | Low | 12/9/2025 |
| v25_12_2 | ## txaio v25_12_2 txaio - Compatibility API for Twisted and asyncio **Installation:** ```bash pip install txaio==25_12_2 ``` **Links:** - 📦 PyPI: https://pypi.org/project/txaio/25_12_2/ - 📖 Docs: https://txaio.readthedocs.io/ - 💻 Source: https://github.com/crossbario/txaio/tree/v25_12_2 See [CHANGELOG](https://github.com/crossbario/txaio/blob/master/docs/changelog.rst) for details. | Low | 12/9/2025 |
| master-202512090312 | ## txaio Development Build **Release:** master-202512090312 **Type:** nightly **Branch:** master **Commit:** 9d1cb8a83964cb52643df4a105dc368c9c4f09ea This is an automated development/nightly build for testing purposes. **Installation:** ```bash pip install https://github.com/crossbario/txaio/releases/download/master-202512090312/txaio-*.whl ``` **Files:** - Universal wheel (py3-none-any) - Source distribution (.tar.gz) - Documentation archive - SHA256 checksums (CHECKSUMS-ALL.sha256) ⚠️ Th | Low | 12/9/2025 |
| fork-6a275e9c-oberstet_txaio-modernization_phase_1_4-202512090307 | ## txaio Development Build **Release:** fork-6a275e9c-oberstet_txaio-modernization_phase_1_4-202512090307 **Type:** development **Branch:** master **Commit:** 6a275e9c5723d4d75cc7168329f455521fc03a68 This is an automated development/nightly build for testing purposes. **Installation:** ```bash pip install https://github.com/crossbario/txaio/releases/download/fork-6a275e9c-oberstet_txaio-modernization_phase_1_4-202512090307/txaio-*.whl ``` **Files:** - Universal wheel (py3-none-any) - Source | Low | 12/9/2025 |
| fork-d7521e05-oberstet_txaio-modernization_phase_1_4-202512081653 | ## txaio Development Build **Release:** fork-d7521e05-oberstet_txaio-modernization_phase_1_4-202512081653 **Type:** development **Branch:** master **Commit:** d7521e052280ee06fe1d200f20604ec6bc145b91 This is an automated development/nightly build for testing purposes. **Installation:** ```bash pip install https://github.com/crossbario/txaio/releases/download/fork-d7521e05-oberstet_txaio-modernization_phase_1_4-202512081653/txaio-*.whl ``` **Files:** - Universal wheel (py3-none-any) - Source | Low | 12/8/2025 |
| fork-6614af72-oberstet_txaio-modernization_phase_1_4-202512080125 | ## txaio Development Build **Release:** fork-6614af72-oberstet_txaio-modernization_phase_1_4-202512080125 **Type:** development **Branch:** master **Commit:** 6614af7250385706382889c599633620fa9ba1e3 This is an automated development/nightly build for testing purposes. **Installation:** ```bash pip install https://github.com/crossbario/txaio/releases/download/fork-6614af72-oberstet_txaio-modernization_phase_1_4-202512080125/txaio-*.whl ``` **Files:** - Universal wheel (py3-none-any) - Source | Low | 12/8/2025 |
| fork-4c542532-oberstet_txaio-modernization_phase_1_4-202512061003 | ## txaio Development Build **Release:** fork-4c542532-oberstet_txaio-modernization_phase_1_4-202512061003 **Type:** development **Branch:** master **Commit:** 4c542532c5539a17c742445b6b5cd6469b75906c This is an automated development/nightly build for testing purposes. **Installation:** ```bash pip install https://github.com/crossbario/txaio/releases/download/fork-4c542532-oberstet_txaio-modernization_phase_1_4-202512061003/txaio-*.whl ``` **Files:** - Universal wheel (py3-none-any) - Source | Low | 12/6/2025 |
| fork-8a9940a2-oberstet_txaio-modernization_phase_1_4-202512052347 | ## txaio Development Build **Release:** fork-8a9940a2-oberstet_txaio-modernization_phase_1_4-202512052347 **Type:** development **Branch:** master **Commit:** 8a9940a2defaef39355598b4a97acd7ae215a168 This is an automated development/nightly build for testing purposes. **Installation:** ```bash pip install https://github.com/crossbario/txaio/releases/download/fork-8a9940a2-oberstet_txaio-modernization_phase_1_4-202512052347/txaio-*.whl ``` **Files:** - Universal wheel (py3-none-any) - Source | Low | 12/5/2025 |
| fork-9a6f64d6-oberstet_txaio-modernization_phase_1_4-202512051421 | ## txaio Development Build **Release:** fork-9a6f64d6-oberstet_txaio-modernization_phase_1_4-202512051421 **Type:** development **Branch:** master **Commit:** 9a6f64d60668a83ee9b5b0ef3623028f20002e99 This is an automated development/nightly build for testing purposes. **Installation:** ```bash pip install https://github.com/crossbario/txaio/releases/download/fork-9a6f64d6-oberstet_txaio-modernization_phase_1_4-202512051421/txaio-*.whl ``` **Files:** - Universal wheel (py3-none-any) - Source | Low | 12/5/2025 |
| master-202512041655 | ## txaio Development Build **Release:** master-202512041655 **Type:** nightly **Branch:** master **Commit:** none This is an automated development/nightly build for testing purposes. **Installation:** ```bash pip install https://github.com/crossbario/txaio/releases/download/master-202512041655/txaio-*.whl ``` **Files:** - Universal wheel (py3-none-any) - Source distribution (.tar.gz) - Documentation archive - SHA256 checksums (CHECKSUMS-ALL.sha256) ⚠️ This is a development build - for prod | Low | 12/4/2025 |
| master-202512041640 | ## txaio Development Build **Release:** master-202512041640 **Type:** nightly **Branch:** master **Commit:** none This is an automated development/nightly build for testing purposes. **Installation:** ```bash pip install https://github.com/crossbario/txaio/releases/download/master-202512041640/txaio-*.whl ``` **Files:** - Universal wheel (py3-none-any) - Source distribution (.tar.gz) - Documentation archive - SHA256 checksums (CHECKSUMS-ALL.sha256) ⚠️ This is a development build - for prod | Low | 12/4/2025 |
| master-202512040342 | ## txaio Development Build **Release:** master-202512040342 **Type:** nightly **Branch:** master **Commit:** e7d0c298ee1dad2e7a6be675d1ad913f538879ee This is an automated development/nightly build for testing purposes. **Installation:** ```bash pip install https://github.com/crossbario/txaio/releases/download/master-202512040342/txaio-*.whl ``` **Files:** - Universal wheel (py3-none-any) - Source distribution (.tar.gz) - Documentation archive - SHA256 checksums (CHECKSUMS-ALL.sha256) ⚠️ Th | Low | 12/4/2025 |
| wheels-20251202-2d0ca8e639ce68e4d4f6d37232ed85a4763cfb5a | Automated wheel build from commit 2d0ca8e639ce68e4d4f6d37232ed85a4763cfb5a | Low | 12/2/2025 |
| wheels-20251125-5dce2a3c0180dab840129b4d8d801f21022ddca2 | Automated wheel build from commit 5dce2a3c0180dab840129b4d8d801f21022ddca2 | Low | 11/25/2025 |
| wheels-20250925-0114a445606ee2e4f7496f97345e4b959090723e | Automated wheel build from commit 0114a445606ee2e4f7496f97345e4b959090723e | Low | 9/25/2025 |
| wheels-20250925-4ed2380d2e715cb7ab540039648bb2c02880c939 | Automated wheel build from commit 4ed2380d2e715cb7ab540039648bb2c02880c939 | Low | 9/25/2025 |
