Skip to main content

Taobao SDK for django.

Project description

a django plugin for Taobao Open API


pip install django-taobao


currently it’s highly depand on python social auth for OAuth2 authentication. so the only thing you need to do for authentication is open your django and add these variable:



SOCIAL_AUTH_TAOBAO_KEY = 'your client id'
SOCIAL_AUTH_TAOBAO_SECRET = 'your app secret'
      TAOBAO_API_URL =''

now modify your

url(r'^taobao/', include('taobao.urls')), # this is taobao api example
url('', include('social.apps.django_app.urls', namespace='social')), # this is for auth

now you can just visit login and get the token

how to use the API

now with the token just got, you can use taobao api now. the get user info example in show how to use the api:

def user_info(request):
          user = get_object_or_404(UserSocialAuth.objects.filter(provider='taobao'),user=request.user)
          token = user.extra_data['access_token']
          t = TaoBao()
          t.setParams(access_token=token, method='taobao.user.seller.get')
          return render_to_response("taobao/index.html", RequestContext(request, {'seller':t.fetch()}))

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-taobao, version 0.2.6
Filename, size File type Python version Upload date Hashes
Filename, size django-taobao-0.2.6.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page