agronholm/anyio
agronholm/anyio has 2,568 GitHub stars and 349 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-08 19:53 UTC. Last push 2026-11-02.
High level asynchronous concurrency and networking framework that works on top of either Trio or asyncio
What you can do
- Task groups (nurseries_ in trio terminology)
- 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
Measured star growth
- in 24h
- 0
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Original.. image:: https://github.com/agronholm/anyio/actions/workflows/test.yml/badge.svg :target: https://github.com/agronholm/anyio/actions/workflows/test.yml :alt: Build Status .. image:: https://coveralls.io/repos/github/agronholm/anyio/badge.svg?branch=master :target: https://coveralls.io/github/agronholm/anyio?branch=master :alt: Code Coverage .. image:: https://readthedocs.org/projects/anyio/badge/?version=latest :target: https://anyio.readthedocs.io/en/latest/?badge=latest :alt: Documentation .. image:: https://badges.gitter.im/gitterHQ/gitter.svg :target: https://gitter.im/python-trio/AnyIO :alt: Gitter chat .. image:: https://tidelift.com/badges/package/pypi/anyio :target: https://tidelift.com/subscription/pkg/pypi-anyio :alt: 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 <https://anyio.readthedocs.io/en/stable/why.html>_.
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.
.. _asyncio: https://docs.python.org/3/library/asyncio.html .. _Trio: https://github.com/python-trio/trio .. _structured concurrency: https://en.wikipedia.org/wiki/Structured_concurrency .. _nurseries: https://trio.readthedocs.io/en/stable/reference-core.html#nurseries-and-spawning .. _Happy eyeballs: https://en.wikipedia.org/wiki/Happy_Eyeballs .. _pytest: https://docs.pytest.org/en/latest/ .. _functools: https://docs.python.org/3/library/functools.html .. _itertools: https://docs.python.org/3/library/itertools.html .. _Hypothesis: https://hypothesis.works/
Security contact information
To report a security vulnerability, please use the Tidelift security contact_.
Tidelift will coordinate the fix and disclosure.
.. _Tidelift security contact: https://tidelift.com/security
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
561,236 starspublic-apis/public-apis
A collective list of free APIs
497,488 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
445,657 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,229 stars