AnyIO is an asynchronous networking and concurrency library that works on top of either asyncio or Trio. It implements Trio-like structured concurrency (SC) on top of asyncio and works in harmony with the native SC of Trio itself.
Applications and libraries written against AnyIO’s API will run unmodified on either asyncio or Trio. AnyIO can also be adopted into a library or application incrementally – bit by bit, no full refactoring necessary. It will blend in with the native libraries of your chosen backend.
To find out why you might want to use AnyIO’s APIs instead of asyncio’s, you can read about it here.
Documentation
View full documentation at: https://anyio.readthedocs.io/
Features
AnyIO offers the following functionality:
Task groups (nurseries in trio terminology)
High-level networking (TCP, UDP and UNIX sockets)
Happy eyeballs algorithm for TCP connections (more robust than that of asyncio on Python 3.8)
async/await style UDP sockets (unlike asyncio where you still have to use Transports and Protocols)
A versatile API for byte streams and object streams
Inter-task synchronization and communication (locks, conditions, events, semaphores, object streams and futures)
Worker threads
Subprocesses
Subinterpreter support for code parallelization (on Python 3.13 and later)
Asynchronous file I/O (using worker threads)
Signal handling
Asynchronous versions of the functools and itertools modules
AnyIO also comes with its own pytest plugin which also supports asynchronous fixtures. It even works with the popular Hypothesis library.
Security contact information
To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.
Release files for anyio 4.15.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| anyio-4.15.1.tar.gz | 277.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| anyio-4.15.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 409.0 kB
Release files / anyio-4.15.1.tar.gz
| Download URL | anyio-4.15.1.tar.gz |
|---|---|
| Size | 277.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f28306018cbd6d329e64a36d58256edff76dd996fe423bc957326e578b82a94
|
|
BLAKE2b-256 checksum How to use checksums |
a9d2f4d173e22df740bc37b1db102b386ba719b66e95b0f0d751f556b387e6d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.
Transparency logRelease files / anyio-4.15.1-py3-none-any.whl
| Download URL | anyio-4.15.1-py3-none-any.whl |
|---|---|
| Size | 132.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6152fdbbf9a77fdec97731721bebf7c4c44f7c29b424b0065826173efc7ed101
|
|
BLAKE2b-256 checksum How to use checksums |
12b84bd346e22b28902df4d651910f5242c28d84e4a5c2435ca5c3f797ed7e2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.
Transparency log