Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/agronholm/anyio
High level asynchronous concurrency and networking framework that works on top of either trio or asyncio
https://github.com/agronholm/anyio
async-await asyncio curio trio
Last synced: 10 days ago
JSON representation
High level asynchronous concurrency and networking framework that works on top of either trio or asyncio
- Host: GitHub
- URL: https://github.com/agronholm/anyio
- Owner: agronholm
- License: mit
- Created: 2018-08-19T21:07:18.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-14T18:15:59.000Z (6 months ago)
- Last Synced: 2024-05-15T14:31:12.024Z (6 months ago)
- Topics: async-await, asyncio, curio, trio
- Language: Python
- Homepage:
- Size: 1.86 MB
- Stars: 1,631
- Watchers: 27
- Forks: 127
- Open Issues: 62
-
Metadata Files:
- Readme: README.rst
- Contributing: docs/contributing.rst
- License: LICENSE
- Support: docs/support.rst
Awesome Lists containing this project
- best-of-python - GitHub - 16% open · ⏱️ 03.06.2024): (Asynchronous Programming)
- awesome-list - AnyIO - High level asynchronous concurrency and networking framework that works on top of either trio or asyncio. (Process, Thread & Coroutine / C++/C Toolkit)
- awesomeLibrary - anyio - High level asynchronous concurrency and networking framework that works on top of either trio or asyncio (语言资源库 / python)
README
.. 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 chatAnyIO 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.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
* Asynchronous file I/O (using worker threads)
* Signal handlingAnyIO 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/
.. _Hypothesis: https://hypothesis.works/