anyio
High-level concurrency and networking framework on top of asyncio or Trio
Decision gist · record as of 2026-08-14
Yes. AnyIO is production-stable, actively maintained, has no known vulnerabilities, and carries a permissive MIT license. It solves a real problem—backend-agnostic async code—with low install friction. Install it if you need to support multiple async backends, want structured concurrency in asyncio, or are building a library that should work across both ecosystems.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction installation with three lightweight runtime dependencies.
- Actively maintained with recent releases; repository shows 2524 stars and last commit on 2026-08-13.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions—standard permissive terms suitable for most projects.
last release 2026-07-12 (33 days) · last repo commit 2026-08-13 · 2,524 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,032,777,959 downloads/mo, #25 on PyPI
Alternatives
Verify before relying
pip install anyio
import anyio
async def main():
async with anyio.create_task_group() as tg:
tg.start_soon(some_async_function)
anyio.run(main)- Whether the happy eyeballs TCP algorithm improvement over asyncio on Python 3.8 remains relevant given minimum requirement is now Python 3.10+
- Specific performance characteristics or benchmarks against native asyncio or Trio implementations
What it is and what it does
AnyIO is a concurrency framework that abstracts over asyncio and Trio, letting you write async code once and run it on either backend without modification. It brings Trio's structured concurrency model (task groups/nurseries) to asyncio, plus a unified API for networking (TCP, UDP, UNIX sockets), synchronization primitives (locks, events, semaphores), worker threads, subprocesses, file I/O, and signal handling.
The library is designed for incremental adoption—you can mix AnyIO calls into existing asyncio or Trio code rather than requiring a full rewrite. It includes a pytest plugin for testing async code and works with the Hypothesis property-testing library. With production-stable status, active maintenance, and no known vulnerabilities, it serves as a bridge for libraries and applications that need to support multiple async backends.
Use it for
- Write a library that works with both asyncio and Trio users without maintaining separate codebases
- Build async networking applications using a higher-level API than raw asyncio transports and protocols
- Implement structured concurrency patterns (task groups) in asyncio-based projects
- Test async code with pytest fixtures and property-based testing via Hypothesis
- Gradually migrate an asyncio codebase to structured concurrency without a full rewrite
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
AnyIO is production-stable, actively maintained, has no known vulnerabilities, and carries a permissive MIT license. It solves a real problem—backend-agnostic async code—with low install friction. Install it if you need to support multiple async backends, want structured concurrency in asyncio, or are building a library that should work across both ecosystems.
Install
anyio on PyPI
Before you install
Low friction installation with three lightweight runtime dependencies. Actively maintained with recent releases; repository shows 2524 stars and last commit on 2026-08-13.
Requires Python 3.10 or later.
License in practice
MIT license permits commercial and private use with minimal restrictions—standard permissive terms suitable for most projects.
Quickstart
pip install anyio
import anyio
async def main():
async with anyio.create_task_group() as tg:
tg.start_soon(some_async_function)
anyio.run(main)
Verify before relying
- Whether the happy eyeballs TCP algorithm improvement over asyncio on Python 3.8 remains relevant given minimum requirement is now Python 3.10+
- Specific performance characteristics or benchmarks against native asyncio or Trio implementations
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesexceptiongroupidnatyping_extensions |
| Maintenance | Actively maintained 33 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,032,777,959 / month, #25 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/StableFramework :: AnyIOIntended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Typing :: Typed |
Evidence: anyio-4.14.2-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 › “asyncio trio abstraction layer”
- anyioAnyIO provides a unified asynchronous API that runs on either asyncio…
- coredisAn async Redis client with full type hints, supporting cluster and…
- anysqliteAnysqlite wraps SQLite with an async/await interface that works with…
Give your agent the search over MCP, or paste the wish link into any chat.
Similar packages
Provides utilities and abstractions built on anyio to simplify backend-agnostic asynchronous programming in Python.
However, be aware that maintenance is dormant—no updates or bug fixes are expected unless you or the community contribute.
A flake8 plugin that detects async-related issues in code using Trio, AnyIO, or asyncio, flagging bugs, dead code, performance problems, and idiom violations.
Trio is an async I/O library that lets you write concurrent Python programs using async/await syntax, handling multiple network connections, file operations, and tasks simultaneously with a focus on correctness and ease of use.
Install it if you need to write concurrent I/O code and prefer structured concurrency principles and a simpler API over asyncio.
Duet is a lightweight async library that wraps Future objects to enable async/await syntax around APIs that return futures, such as gRPC, while supporting re-entrant event loops.
Not recommended as a general-purpose async framework.
Provides an asynchronous client for SQLite that works with any async framework via AnyIO, enabling non-blocking database access without thread pools.
A Python client library for connecting to and sending commands to Factorio game servers via RCON protocol, with optional async support.