jump to navigation

Python + Twitter January 10, 2011

Posted by PythonGuy in bit.ly, oauth2, Python, Twitter.
add a comment

If you’re going to write Python code to interface with Twitter, I recommend python-twitter, oauth2, and bitlyapi.

For Twitter API, there are a lot of other packages out there. I’ve tried all the ones that are on PyPI. Python-twitter at the time didn’t compile, but it was due to a simple mistake easily remedied. Once I got past that hurdle, it worked beautifully.

For OAuth2 stuff, OAuth2 is perfect. There is one, small, tiny, flaw, but if you don’t run into it, you won’t notice it. There’s an easy workaround documented where you’d expect to find it should you search for it. I like the idea that the same module I use for Twitter could potentially be used for Facebook and every other site out there that uses OAuth2, which seems to be rapidly approaching a universal standard. One day, when I implement my own API, I’ll be using oauth2 to write the server-side code.

bitlyapi fit the bill for the exact purpose I needed it for. What more can be said?

I haven’t tried images yet, and I don’t really intend to any time soon. Maybe one day.

One day I’m going to complain about how all the different APIs modules are not interchangeable. You’d think that with so many APIs out there, and with them quickly coalescing into a universal standared (REST), that there would be some uniformity. Alas, that is not so. Ah well, maybe in a few more years Python will solve that problem before it gets really annoying.

Or maybe someone will write a generic package that can map any RESTful interface.

Advertisements