SoundCloud for Developers

Discover, connect and build

We use cookies for various purposes including analytics and personalized marketing. By continuing to use the service, you agree to our use of cookies as described in the Cookie Policy.

Backstage Blog March 6th, 2012 Announcements SDKs Announcing new Python SDK By Paul Osman

It's no secret that SoundCloud is a Ruby shop, but that doesn't stop us from giving some love to the Pythonistas in our community.

Our old Python API wrapper has been neglected. It doesn't support OAuth 2 or all of the resources made available by our API. It's old and crufty and we're sorry for letting it get that way. In order to make it up to you, we wrote a new one and made it much better.

Our new Python SDK has an interface that should be very familiar to anyone who has used our Ruby or JS SDKs:

import soundcloud

# Create a new client that uses the user credentials oauth flow
client = soundcloud.Client(client_id='YOUR_CLIENT_ID',
                           client_secret='YOUR_CLIENT_SECRET',
                           username='YOUR_USERNAME',
                           password='YOUR_PASSWORD')

# print the username of the authorized user
print client.get('/me').username

It is available on PyPi, so you can install it using easy_install, or better yet, pip. The source code is available on GitHub, contributions of all kind are very welcome.

If you want to give it a whirl, you can install it from PyPi and take a look at the examples in the README file. As always, let us know if you're building something cool, we'd love to hear about it!