taobao tmc python, 淘宝开放平台消息服务python客户端
Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
taobaotmcpy
unpacktests
.gitignore
LICENSE
README.md
requirements.txt
setup.cfg
setup.py

README.md

taobao-tmc-python

淘宝平台消息服务python版本

usage:

import taobaotmcpy
import tornado
import logging

logging.basicConfig(level=logging.DEBUG)

ws = taobaotmcpy.TmcClient('ws://mc.api.tbsandbox.com/', 'appkey', 'appsecret', 'default',
    query_message_interval=50)
def print1():
    print 'on_open'

ws.on("on_open", print1)

try:
    tornado.ioloop.IOLoop.instance().start()
except KeyboardInterrupt:
    pass
finally:
    ws.close()

或者

python2 -m taobaotmcpy