Posting to Twitter from Python
I found this little known Twitter API library for Python (on github). It is minimalist and very simple which I love. It's so easy to interact with the Twitter API from your Python application, that I am almost embarrassed to blog about it.
After downloading the library and putting the twitter/ directory on your Python path, this is all code you have to write to update your Twitter status:
from twitter.api import Twitter
twitter = Twitter('username','password')
twitter.statuses.update(status='I am tweeting from Python!')
Happy tweeting from Python!
blog comments powered by Disqus