Avatar

Harper Reed's Blog

Python Oauth Client - Excla.im

· 328 words · 2 minutes

Please note: This post was written some time ago (15 years ago). My perspectives, knowledge, and opinions may have evolved significantly since then. While the content might still offer valuable insights, I encourage readers to consider it in the context of its publication date.

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.

#oauth #python #technology #authentication