#!/usr/bin/env python import datetime try : import json except ImportError : import simplejson as json import urllib, hashlib import base64 ENVIRONMENT = 'devel' # or product if ENVIRONMENT == 'devel' : AppKey = 'test' AppSecret = 'test' Gateway = 'http://gw.api.tbsandbox.com/router/rest' elif ENVIRONMENT == 'product' : AppKey = '12345678' AppSecret = '------------------------------------' Gateway = 'http://gw.api.taobao.com/router/rest' else : import sys print >>sys.stderr, "ENVIRONMENT is neither devel nor product" sys.exit(1) Format = 'json' SignMethod = 'md5' APIVersion = '2.0' SDKVersion = 'tao_api_python_1.0' class Client : def __init__(self, **kwargs) : self