High-level concurrency and networking framework on top of asyncio or Trio
Project description
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)
Worker threads
Subprocesses
Subinterpreter support for code parallelization (on Python 3.13 and later)
Asynchronous file I/O (using worker threads)
Signal handling
Asynchronous version of the functools module
AnyIO also comes with its own pytest plugin which also supports asynchronous fixtures. It even works with the popular Hypothesis library.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file anyio-4.12.1.tar.gz.
File metadata
- Download URL: anyio-4.12.1.tar.gz
- Upload date:
- Size: 228.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41cfcc3a4c85d3f05c932da7c26d0201ac36f72abd4435ba90d0464a3ffed703
|
|
| MD5 |
10e3ba7d02402b6605d834a1e4881a1d
|
|
| BLAKE2b-256 |
96f05eb65b2bb0d09ac6776f2eb54adee6abe8228ea05b20a5ad0e4945de8aac
|
Provenance
The following attestation bundles were made for anyio-4.12.1.tar.gz:
Publisher:
publish.yml on agronholm/anyio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anyio-4.12.1.tar.gz -
Subject digest:
41cfcc3a4c85d3f05c932da7c26d0201ac36f72abd4435ba90d0464a3ffed703 - Sigstore transparency entry: 798252487
- Sigstore integration time:
-
Permalink:
agronholm/anyio@a0dccbd78d75886247ae7846b460fd390cc94fbd -
Branch / Tag:
refs/tags/4.12.1 - Owner: https://github.com/agronholm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a0dccbd78d75886247ae7846b460fd390cc94fbd -
Trigger Event:
push
-
Statement type:
File details
Details for the file anyio-4.12.1-py3-none-any.whl.
File metadata
- Download URL: anyio-4.12.1-py3-none-any.whl
- Upload date:
- Size: 113.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d405828884fc140aa80a3c667b8beed277f1dfedec42ba031bd6ac3db606ab6c
|
|
| MD5 |
2ef04e7c3e1747f5e5f2bc22722bcd06
|
|
| BLAKE2b-256 |
380e27be9fdef66e72d64c0cdc3cc2823101b80585f8119b5c112c2e8f5f7dab
|
Provenance
The following attestation bundles were made for anyio-4.12.1-py3-none-any.whl:
Publisher:
publish.yml on agronholm/anyio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anyio-4.12.1-py3-none-any.whl -
Subject digest:
d405828884fc140aa80a3c667b8beed277f1dfedec42ba031bd6ac3db606ab6c - Sigstore transparency entry: 798252495
- Sigstore integration time:
-
Permalink:
agronholm/anyio@a0dccbd78d75886247ae7846b460fd390cc94fbd -
Branch / Tag:
refs/tags/4.12.1 - Owner: https://github.com/agronholm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a0dccbd78d75886247ae7846b460fd390cc94fbd -
Trigger Event:
push
-
Statement type: