git: https://github.com/PeterDing/mugen
文档: https://peterding.github.io/mugen-docs
Mugen 是一个运行在 Python3.4+ 的 HTTP 异步请求库。
现在支持以下特性:
- Keep-Alive & Connection Pooling
- DNS cache
- Sessions with Cookie Persistence
- Automatic Decompression
- Automatic Content Decoding
- HTTP(S) Proxy Support
- Connection Timeouts
Mugen 的 api 设计参考了 requests ,如果对 requests 熟悉,使用 Mugen 就基本没有障碍。
目前 Mugen 只提供 GET, POST, HEAD 三个基本请求,以后会不断增加其他请求方法。
如果所有的请求只用到 IO ,计算比较少,相对于多线程和多进程,异步 IO 处理是更好的方法。
Enjoy!