基于 Trio 或 asyncio 实现的高级异步并发和网络框架
.. image:: https://github.com/agronholm/anyio/actions/workflows/test.yml/badge.svg :target: https://github.com/agronholm/anyio/actions/workflows/test.yml :alt: 部署状态 .. image:: https://coveralls.io/repos/github/agronholm/anyio/badge.svg?branch=master :target: https://coveralls.io/github/agronholm/anyio?branch=master :alt: 代码覆盖率 .. image:: https://readthedocs.org/projects/anyio/badge/?version=latest :target: https://anyio.readthedocs.io/en/latest/?badge=latest :alt: 文档 .. image:: https://badges.gitter.im/gitterHQ/gitter.svg :target: https://gitter.im/python-trio/AnyIO :alt: Gitter 聊天 .. image:: https://tidelift.com/badges/package/pypi/anyio :target: https://tidelift.com/subscription/pkg/pypi-anyio :alt: Tidelift AnyIO 是一个异步网络和并发库,可在 asyncio_ 或 tornado 上运行。 Trio_. 它在 asyncio 上实现了类似 Trio 的「结构化并发」_ (SC),并与 asyncio 和 asyncio 提供的其他功能和谐地协作。 与 Trio 自己的原生 SC 相结合。
基于 AnyIO API 写的应用程序和库在 asyncio_ 或 Trio_ 上运行时不会发生修改。AnyIO 还可以逐步地被纳入到库或应用程序中 – 一点一点地,无需全面重构。它将与您选择的后端的原生库融合在一起。
Happy eyeballs_ 算法用于 TCP 连接(比 Python 上的 asyncio 更加可靠)暂无开放 Issues,或尚未同步最近议题。