V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
messense
V2EX  ›  分享创造

基于 Tornado coroutine 和 AsyncHTTPClient 的异步微信公众号接口

  •  
  •   messense ·
    messense · 2015-11-20 14:29:17 +08:00 · 2808 次点击
    这是一个创建于 3086 天前的主题,其中的信息可能已经有所发展或是发生改变。
    https://github.com/messense/wechatpy/tree/async-client

    暂时还只是 Proof of Concept 阶段。

    基于 Tornado coroutine 和 AsyncHTTPClient 实现了异步的微信开放平台公众号的相关接口调用,实现部分代码: https://github.com/messense/wechatpy/blob/async-client/wechatpy/client/async/tornado.py

    Example code: https://github.com/messense/wechatpy/blob/async-client/examples/async-client/app.py

    参考自 lastfmclient 的实现方式: https://github.com/jkbrzt/lastfmclient/blob/master/lastfmclient/async.py

    我对 Tornado 也不是很熟,粗糙地写的,欢迎提意见和建议~
    3 条回复    2016-04-23 00:45:10 +08:00
    messense
        1
    messense  
    OP
       2015-11-20 14:30:23 +08:00
    对了,有空再看下能不能用 asyncio 来搞 :-)
    lazygunner
        2
    lazygunner  
       2015-11-20 16:44:34 +08:00
    前排赞一个
    Gimlyu
        3
    Gimlyu  
       2016-04-23 00:45:10 +08:00
    hi , async client ( https://github.com/wechatpy/wechatpy.async.tornado) 的 import `from six.moves.urllib.parse import urlencode` 找不到呀。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2123 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 11:33 · PVG 19:33 · LAX 04:33 · JFK 07:33
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.