txaio
Compatibility API between asyncio/Twisted/Trollius
Decision gist · record as of 2026-08-14
Yes. txaio is actively maintained, has no dependencies, installs easily, carries no security vulnerabilities, and solves a real problem for anyone writing async code that needs to support multiple event loop frameworks. Use it if you're building a library or application that should work with both Twisted and asyncio; skip it if you're committed to a single framework.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.11 or later; you must have either Twisted or asyncio available at runtime.
- Low friction—pure Python wheel with no runtime dependencies.
- Actively maintained with a recent release; last commit 2026-06-18.
License · maintenance · safety
MIT (permissive) — MIT license (permissive); you can use, modify, and distribute this package with minimal restrictions.
last release 2026-06-18 (57 days) · last repo commit 2026-06-18 · 56 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 6,822,988 downloads/mo, #1,842 on PyPI
Alternatives
Verify before relying
pip install txaio
import txaio
txaio.use_twisted() # or .use_asyncio()
f = txaio.create_future()
txaio.resolve(f, "value")
result = txaio.as_future(some_func, 1, 2)- Whether Trollius support is still actively tested or documented given the description mentions it but the classifiers do not.
- Current test coverage across CPython 3.11+ and PyPy 3 versions listed in classifiers.
What it is and what it does
txaio is an abstraction layer over async event loops, similar to how six bridges Python 2 and 3 differences. Instead of writing separate code paths for Twisted's Deferred and asyncio's Future, you write against txaio's unified API and choose at runtime which event loop to use. Your code runs natively on whichever framework you select—there is no event loop adapter or bridge, just a compatibility shim over the core abstractions like futures, callbacks, and errbacks.
The library is useful when you want to write a library or application that doesn't force a dependency choice on users. You provide helper functions like `create_future()`, `add_callbacks()`, `resolve()`, and `reject()` that map to the underlying framework's primitives. This means a single codebase can serve both Twisted and asyncio users without modification, though it does require you to adopt txaio's function-based style rather than direct object instantiation.
Use it for
- Write a library that works with both Twisted and asyncio without maintaining two code paths.
- Build an application where users can choose their async framework at deployment time without code changes.
- Migrate from Twisted to asyncio (or vice versa) incrementally by using txaio as a compatibility bridge.
- Create async utilities and helpers that are framework-agnostic and reusable across projects.
- Test the same async logic against both event loops to ensure portability.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
txaio is actively maintained, has no dependencies, installs easily, carries no security vulnerabilities, and solves a real problem for anyone writing async code that needs to support multiple event loop frameworks. Use it if you're building a library or application that should work with both Twisted and asyncio; skip it if you're committed to a single framework.
Install
txaio on PyPI
Before you install
Low friction—pure Python wheel with no runtime dependencies. Actively maintained with a recent release; last commit 2026-06-18.
Requires Python 3.11 or later; you must have either Twisted or asyncio available at runtime.
License in practice
MIT license (permissive); you can use, modify, and distribute this package with minimal restrictions.
Quickstart
pip install txaio
import txaio
txaio.use_twisted() # or .use_asyncio()
f = txaio.create_future()
txaio.resolve(f, "value")
result = txaio.as_future(some_func, 1, 2)
Verify before relying
- Whether Trollius support is still actively tested or documented given the description mentions it but the classifiers do not.
- Current test coverage across CPython 3.11+ and PyPy 3 versions listed in classifiers.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 57 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,822,988 / month, #1,842 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleFramework :: TwistedIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Application Frameworks |
Evidence: txaio-26.6.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “twisted asyncio compatibility”
- txaiotxaio provides a compatibility layer that lets you write async code…
- prometheus-asyncAdds async/await support to Prometheus metrics collection for asyncio…
- autobahnAutobahn provides WebSocket and WAMP (Web Application Messaging…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also localstack-twisted · asyncio · Twisted · pytest-twisted · unsync · crochet · treq · autobahn · prometheus-async