├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── docs ├── .gitkeep └── CNAME └── mkdocs.yml /.gitignore: -------------------------------------------------------------------------------- 1 | # MacOS 2 | .DS_Store 3 | 4 | # for docs 5 | docs/index.md 6 | site/ 7 | 8 | # for vscode 9 | .vscode/ 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Attribution 4.0 International License (CC BY 4.0) 2 | 3 | http://creativecommons.org/licenses/by/4.0/ 4 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | site_install: 2 | pip install mkdocs==0.16.3 3 | pip install mkdocs-material==1.12.2 4 | 5 | site_link: 6 | ln -sf $(CURDIR)/README.md $(CURDIR)/docs/index.md 7 | 8 | site_preview: site_link 9 | mkdocs serve 10 | 11 | site_deploy: site_link 12 | mkdocs gh-deploy --clean 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | Awesome 3 |

4 |

Awesome-Asyncio-CN

5 |

6 | Python Asyncio 精选资源列表,囊括了网络框架,库,软件等资源 7 |

8 |

9 | 10 | awesome-list 11 | 12 | 13 | contributions-welcome 14 | 15 |

16 | 17 | [Awesome-asyncio](https://github.com/timofurrer/awesome-asyncio) 是 [Timo Furrer](https://github.com/timofurrer) 发起并维护的 Python Asyncio 资源列表。我觉得这个是很赞的想法,所以维护了一个中文版本的,在这里,收集了大量的 [Asyncio](https://docs.python.org/3/library/asyncio.html) 的最棒、最新的资源,供大家探索 Python 异步编程世界。 18 | 19 | Python 3.4 引入了 Asyncio 模块作为标准库,通过协程、多路 I/O 访问 Socket 和其他资源来编写单线程并发代码,并在网络客户端与服务器上运行。Asyncio 内置了对异步 I/O 的支持,其编程模型类似于消息循环,从 Asyncio 模块可以直接获取 EventLoop 引用,再把需要执行的协程放到 EventLoop 中执行,就实现了异步 I/O。Asyncio 是由 Python 之父 Guido 领导的项目,该项目被命名为 Tulip(郁金香)。 20 | 21 | [Asyncio](https://docs.python.org/3/library/asyncio.html) 并不是新出现的黑科技,一些社区有名的第三库如 Twisted、gevent 早就推出了异步编程模型。不过,自从 2016 年 3 月,Python 3.4 推出以后,这两年来,Asyncio 变得越来越流行,并且特别受到 Python 社区追捧。 22 | 23 | 24 | ## 贡献代码 25 | 26 | 欢迎大家为列表贡献高质量的新资源,提交 PR 时请参照以下要求 27 | 28 | * 注明推荐理由 29 | * 确保项目相对活跃 30 | 31 | ## 目录 32 | 33 | * [Web 框架](#Web框架) 34 | * [消息队列](#消息队列) 35 | * [数据库驱动](#数据库驱动) 36 | * [网络](#网络) 37 | * [爬虫](#爬虫) 38 | * [测试](#测试) 39 | * [备选事件循环](#备选事件循环) 40 | * [并行](#并行) 41 | * [其他](#其他) 42 | * [文献](#文献) 43 | * [演讲](#演讲) 44 | 45 | 46 | ## Web框架 47 | 48 | *构建 Web 应用的库* 49 | 50 | * [aiohttp](https://github.com/KeepSafe/aiohttp) - 支持 Asyncio (PEP-3156) 的 HTTP 客户端/服务端网络库。 51 | * [sanic](https://github.com/channelcat/sanic) - Python 3.5+ Web 服务器,主打速度与性能。 52 | * [Quart](https://gitlab.com/pgjones/quart) - 支持 Asyncio 的 Web 微框架,使用与 Flask 相同的 API。 53 | * [Kyoukai](https://github.com/SunDwarf/Kyoukai) - 使用 Asyncio 编写的 Python3.5+ 完全异步 Web 框架。 54 | * [cirrina](https://github.com/neolynx/cirrina) - 基于 aiohttp 的异步 Web 框架。 55 | * [autobahn](https://github.com/crossbario/autobahn-python) - 支持 Asyncio 与 Twisted 的 WebSocket 及 WAMP,用于客户端与服务端。 56 | * [websockets](https://github.com/aaugustin/websockets/) - Python 构建的 WebSocket 客户端/服务端的库,致力于简洁、正确地编写代码。 57 | * [Tornado](http://www.tornadoweb.org/en/stable/) - 高性能 Web 框架以及异步网络库。 58 | * [Japronto!](https://github.com/squeaky-pl/japronto) - 基于 uvloop 和 picohttpparse 构建的实验性 HTTP 工具箱。 59 | * [uvicorn](https://github.com/encode/uvicorn) - 轻量级的,快速的 ASGI 服务器。 60 | 61 | ## 消息队列 62 | 63 | *使用消息队列执行应用的库* 64 | 65 | * [aioamqp](https://github.com/Polyconseil/aioamqp) - 使用 Asyncio 异步执行 AMQP。 66 | * [aiozmq](https://github.com/aio-libs/aiozmq) - 集成了 Asyncio (pep 3156) 的 ZeroMQ。 67 | * [crossbar](https://github.com/crossbario/crossbar) - Crossbar.io 是提供分布式和微服务应用的网络平台。 68 | 69 | ## 数据库驱动 70 | 71 | *数据库的驱动库* 72 | 73 | * [asyncpg](https://github.com/MagicStack/asyncpg) - 快速访问 PostgreSQL 数据库客户端的异步驱动。 74 | * [asyncpgsa](https://github.com/CanopyTax/asyncpgsa) - 提供 Sqlalchemy Core 支持的 Asyncpg。 75 | * [aiopg](https://github.com/aio-libs/aiopg/) - 访问 PostgreSQL 数据库的异步驱动。 76 | * [aiomysql](https://github.com/aio-libs/aiomysql) - 访问 MySQL 数据库的异步驱动。 77 | * [aioodbc](https://github.com/aio-libs/aioodbc) - 访问 ODBC 数据库的异步驱动。 78 | * [motor](https://github.com/mongodb/motor) - 访问 MongoDB 数据库的异步驱动。 79 | * [aioredis](https://github.com/aio-libs/aioredis) - [aio-libs](https://github.com/aio-libs) 提供的异步 Redis 客户端 (PEP 3156)。 80 | * [asyncio-redis](https://github.com/jonathanslenders/asyncio-redis) - 访问 Redis 客户端 (PEP 3156)的异步驱动。 81 | * [aiocouchdb](https://github.com/aio-libs/aiocouchdb) - 基于 aiohttp (Asyncio) 构建的 CouchDB 客户端。 82 | * [aioinflux](https://github.com/plugaai/aioinflux) - 基于 aiohttp 构建的 InfluxDB 客户端。 83 | * [aioes](https://github.com/aio-libs/aioes) - 兼容 elasticsearch 的 Asyncio 驱动。 84 | * [peewee-async](https://github.com/05bit/peewee-async) - 基于 [peewee](https://github.com/coleifer/peewee) 和 aiopg 实现的 ORM。 85 | * [GINO](https://github.com/fantix/gino) - 基于 [SQLAlchemy](https://www.sqlalchemy.org/) Core 和 [asyncpg](https://github.com/MagicStack/asyncpg) 方言的轻量级 Python 异步 ORM。 86 | * [aiocache](https://github.com/argaen/aiocache) - 支持多个后端 (Memory、Redis 和 Memcached) 的 Asyncio 缓存管理器。 87 | * [aiomcache](https://github.com/aio-libs/aiomcache) - 访问 Memcached 的 Asyncio(PEP 3156) 驱动库。 88 | 89 | ## 网络 90 | 91 | *网络通讯库* 92 | 93 | * [AsyncSSH](https://github.com/ronf/asyncssh) - 提供执行 SSHv2 协议的异步客户端/服务端。 94 | * [asks](https://github.com/theelous3/asks) - 与 [requests](https://github.com/requests/requests) 接口相似的异步 HTTP 库。 95 | * [aioftp](https://github.com/aio-libs/aioftp) - 基于 Asyncio 的 ftp 服务。 96 | * [aiodns](https://github.com/saghul/aiodns) - 简单的 Asyncio DNS 服务解析器。 97 | * [websockets](https://github.com/aaugustin/websockets) 构建于 Asyncio 之上的异步 websockets 库。 98 | 99 | ## 爬虫 100 | 101 | *应用于网络爬虫的库* 102 | 103 | * [gain](https://github.com/gaojiuli/gain) - 基于 Asycnio 的网络爬虫框架。 104 | * [aspider](https://github.com/howie6879/aspider) - 基于 Asyncio 和 aiohttp 的网络爬虫框架。 105 | * [Scrapy](https://github.com/scrapy/scrapy) - 一个为了爬取网站数据,提取结构性数据而编写的应用框架。 106 | 107 | ## 测试 108 | 109 | *测试 Asyncio 应用程序的库* 110 | 111 | * [aiomock](https://github.com/nhumrich/aiomock/) - 支持异步的 Python mock 库。 112 | * [asynctest](https://github.com/Martiusweb/asynctest/) - 一个增强标准 unittest 包的测试库。 113 | * [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) - 支持 Asyncio 的 Pytest 库。 114 | * [aioresponses](https://github.com/pnuckowski/aioresponses) - 一个适用于 aiohttp 的模拟请求库。 115 | 116 | ## 备选事件循环 117 | 118 | *备选的 Asyncio 循环库* 119 | 120 | * [uvloop](https://github.com/MagicStack/uvloop) - 基于 libuv 实现的 Asyncio 事件循环库。 121 | * [curio](https://github.com/dabeaz/curio) - 协程并发库。 122 | * [trio](https://github.com/python-trio/trio) - 人性化的,Pythonic 的异步 IO 库。 123 | 124 | ## 并行 125 | 126 | *并行异步编程的库* 127 | 128 | * [aioprocessing](https://github.com/dano/aioprocessing) - 结合 multiprocessing 与 Asyncio 的进程库,支持 Python3.4+。 129 | * [aiomultiprocess](https://github.com/jreese/aiomultiprocess) - 进一步提升异步性能的多进程库。 130 | * [asynq](https://github.com/quora/asynq) - Quora 出品的 Python 异步编程库。 131 | 132 | ## 其他 133 | 134 | *未归类的优秀 Asnycio 库* 135 | 136 | * [aiofiles](https://github.com/Tinche/aiofiles/) - 基于 Asyncio,支持文件异步操作。 137 | * [aiodebug](https://github.com/qntln/aiodebug) - 用于监控和测试 Asyncio 程序的微型库。 138 | * [aiorun](https://github.com/cjrh/aiorun) - 提供处理通用 Asyncio 样板,启动和关闭事件驱动的 `run` 函数。 139 | * [aiozipkin](https://github.com/aio-libs/aiozipkin) - 使用 zipkin 的分布式 Asyncio 追踪测量仪。 140 | * [faust](https://github.com/robinhood/faust) - 纯 Python 的流处理库,用于处理流数据和事件。 141 | * [paco](https://github.com/h2non/paco) - 协程驱动的异步编程的工具库 (Python3.4+)。 142 | * [aiortc](https://github.com/jlaine/aiortc) - 使用 Python asyncio 实现的 WebRTC 和 ORTC。 143 | * [aiotools](https://github.com/achimnol/aiotools) - 通用的 Asyncio 工具集。 144 | 145 | ## 文献 146 | 147 | *关于 Asyncio 的文档、博客等文献* 148 | 149 | * [Asyncio 官方文档](https://docs.python.org/3/library/asyncio.html) - 介绍了异步 I/O、事件循环、协程及任务等内容。 150 | * [Asyncio 精编简介](http://masnun.com/2015/11/13/python-generators-coroutines-native-coroutines-and-async-await.html) - 生成器,协程,原生协程及 async/await。 151 | * [异步窥探](https://hackernoon.com/async-through-the-looking-glass-d69a0a88b661) - 非常好的一篇文章,列出了哪些用例应该使用 Asyncio ,哪些用例无需使用 Asyncio。 152 | * [异步 Python](https://hackernoon.com/asynchronous-python-45df84b82434) - 介绍如何进行 Python 异步编程。 153 | * [用 Asyncio 进行 Python 开发](https://hackernoon.com/asyncio-for-the-working-python-developer-5c468e6e2e8e) - 介绍异步编程的开发,从简单示例说起,一直到 URL 爬取。 154 | * [Python Aiohttp 的测试极限](https://pawelmhm.github.io/asyncio/python/aiohttp/2016/04/22/asyncio-aiohttp.html) - 使用 Python Aiohttp 进行百万量级的并发测试。 155 | * [Python Asyncio 入门介绍](https://hackernoon.com/a-simple-introduction-to-pythons-asyncio-595d9c9ecf8c) - 通俗易懂的 Python asyncio 库入门介绍。 156 | * [深入理解 Python 异步编程(上)](http://aju.space/2017/07/31/Drive-into-python-asyncio-programming-part-1.html) - 彻底理解异步编程是什么、为什么、怎么样。深入学习 asyncio 的基本原理和原型,了解生成器、协程在 Python 异步编程中是如何发展的。 157 | 158 | ## 演讲 159 | 160 | *关于 Asyncio 的主题演讲* 161 | 162 | * [Topics of Interest (Python Asyncio)](https://www.youtube.com/watch?v=ZzfHjytDceU) - David Beazley 的主题演讲。 163 | * [Python Asynchronous I/O Walkthrough](https://www.youtube.com/playlist?list=PLpEcQSRWP2IjVRlTUptdD05kG-UkJynQT) - Philip Guo 的主题演讲。 164 | * [Thinking Outside the GIL with AsyncIO and Multiprocessing](https://www.youtube.com/watch?v=0kXaLh8Fz3k&t=1279s) - John Reese 的主题演讲 165 | * [Asynchronous Python for the Complete Beginner](https://www.youtube.com/watch?v=iG6fr81xHKA) - Miguel Grinberg 的主题演讲 166 | -------------------------------------------------------------------------------- /docs/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenjiandongx/awesome-asyncio-cn/268c942ed738a80a27b4bf1cde8180c5489bd90b/docs/.gitkeep -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | awesome-asyncio-cn.top 2 | -------------------------------------------------------------------------------- /mkdocs.yml: -------------------------------------------------------------------------------- 1 | site_name: 'Python asyncio 资源列表' 2 | site_url: 'http://awesome-asyncio-cn.top' 3 | site_author: 'chenjiandongx' 4 | repo_name: 'chenjiandongx/awesome-asyncio-cn/' 5 | repo_url: 'https://github.com/chenjiandongx/awesome-asyncio-cn/' 6 | theme: 'material' 7 | extra: 8 | feature: 9 | tabs: false 10 | primary: 'blue' 11 | accent: 'blue' 12 | social: 13 | - type: 'github' 14 | link: 'https://github.com/chenjiandongx' 15 | pages: 16 | - "awesome-asyncio-cn": "index.md" 17 | --------------------------------------------------------------------------------