Python Oauth Client - Excla.im
Posted on Feb 28, 2009
I built Excla.im quite awhile ago, well before Twitter unleased their oauth beta program. Regardless, Chris Messina tagged the Excla.im sign up process as an anty pattern within his flickr stream. I was bummed because i would have loved to use Oauth to authenticate Excla.im. But because of the tagging, i was constantly thinking about how to remove the anti pattern.
Finally, Twitter released the Oauth Beta and I was able to bribe @Al3x to give me access (which reminds me, i need to send my bribe). I then sat for a month looking at the various python examples for OAuth and basically said “What The Fuck” over and over again. There were no solid examples and my experience with OAuth in PHP was a total hack so i could post shit to fireeagle. I was SOL as to finding a guide.
Then abrah.am released his PHP twitter OAuth lib. It worked really well and was pretty much just plug and play to use it in a PHP app. Nice. I wanted that but in python. I decided to spend a minute or two and create it.
The base library my client is using is the the OAuth lib from google gdata-python-client project. I figure it is a working client and is in production use - so it should be solid. There are very few changes between it and the official client that is released through oauth.net.
The client is rather simple, in fact it should work with other api providers with very little work. You can check it out at github. Please let me know feedback. i am a python n00b - so give me your best shot/code review. I am using Google Code as a issue tracker, so feel free to post some bugs.
It is rather pluggable. I was able to launch excla.im (on app engine) with oauth support in no time. I am currently not holding passwords for anyone. It is an awesome feeling.