Skip to main content
Build Status Code Coverage Documentation Gitter chat Tidelift

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.

Metadata

Release files for anyio 4.16.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anyio 4.16.0
File Size Uploaded Provenance Actions
anyio-4.16.0.tar.gz 311.0 kB With provenance Details for anyio-4.16.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for anyio 4.16.0
File Interpreter ABI Platform Actions
anyio-4.16.0-py3-none-any.whl Python 3 none any Details for anyio-4.16.0-py3-none-any.whl

Total release size: 445.5 kB

Release files / anyio-4.16.0.tar.gz

Download URL anyio-4.16.0.tar.gz
Size 311.0 kB
Tags Source
SHA-256 checksum
How to use checksums
59bb03251907983d1603d27c3087ddb1e93299ea2163adcdba37899a4fb12ffb
BLAKE2b-256 checksum
How to use checksums
a1987e457a3b014976887a050561955c0b76e1e7e2d6e27b78ecef2ef80518f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 1, 2026.

Transparency log

Release files / anyio-4.16.0-py3-none-any.whl

Download URL anyio-4.16.0-py3-none-any.whl
Size 134.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c66ae634e0b8228396b801741beb3294326d4b6102f7bba4041c0dfb58c29026
BLAKE2b-256 checksum
How to use checksums
a9167757fb84c819accc7d7e9af5291b261e4abb8627ee040f99e7d35ef2457a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 1, 2026.

Transparency log

Security for anyio 4.16.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for anyio-4.16.0.tar.gz

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 Nov 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

4.16.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page