爱意满满的作品展示区。
PeterD

Mugen - Python3 HTTP 异步请求库

  •  2
     
  •   PeterD ·
    PeterDing · Oct 21, 2016 · 5062 views
    This topic created in 3672 days ago, the information mentioned may be changed or developed.

    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!

    9 replies  •  2016-10-21 16:36:51 +08:00
    Dowding
    Dowding
    Oct 21, 2016
    1
    这名字让我一惊
    lcx412
    lcx412
    Oct 21, 2016 via iPhone
    2
    小芳,早
    Shared
    Shared
    Oct 21, 2016
    3
    文档写的好,支持一记
    PeterD
    PeterD
    OP
    Oct 21, 2016
    4
    @Shared 原谅我蹩脚的英文( ̄∇ ̄;)))
    Shared
    Shared
    Oct 21, 2016
    5
    @PeterD 在 https://peterding.github.io/mugen-docs/#install-from-source-code 这段有 bug ,代码还是 requests 的 XD
    doubleflower
    doubleflower
    Oct 21, 2016
    6
    又一个轮子啊
    cheetah
    cheetah
    Oct 21, 2016
    7
    可以和 aiohttp 对比一下?
    PeterD
    PeterD
    OP
    Oct 21, 2016
    8
    @Shared 改好了,感谢提醒
    johnhosimple
    johnhosimple
    Oct 21, 2016
    9
    支持一下
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4256 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 08:23 · PVG 16:23 · LAX 00:23 · JFK 03:23
    ♥ Do have faith in what you're doing.