pyTOP is an ISC Licensed Taobao Open Platform API library, written in Python.
To install pyTOP, simply:
$ pip install pyTOP
Or, if you absolutely must:
$ easy_install pyTOP
Or, download the source file and run:
$ python setup.py install
You could setup API KEY and APP SECRET in system environment (~/.bash_profile)
# TOP ENVIRONMENT
TOP_ENVIRONMENT = product # or sandbox
# PRODUCT VARS
TOP_PRODUCT_API_KEY = 12345678
TOP_PRODUCT_APP_SECRET = 9f127588ceb726905e078b64ab88a362
TOP_PRODUCT_API_URL = http://gw.api.taobao.com/router/rest
# SANDBOX VARS
TOP_SANDBOX_API_KEY = 12345678
TOP_SANDBOX_APP_SECRET = sandbox8ceb726905e078b64ab88a362
TOP_SANDBOX_API_URL = http://gw.api.tbsandbox.com/router/rest
>>> user = User()
>>> user.get('bububa')
>>> print user
<User: user_id=180018765, uid=520be25d2ae9de5ea1d6a784e67d6edf, nick=bububa, buyer_credit=<UserCredit: level=0, score=0, total_num=0, good_num=0>, seller_credit=<UserCredit: level=0, score=0, total_num=0, good_num=0>, created=2011-11-21 15:11:47, last_visit=2011-11-21 15:12:07, type=C, has_shop=False, is_lightning_consignment=False>
...