Skip to content

Simple Python Twitter Module

January 22, 2009

Here (download) is a very simple Python Twitter module.  It doesn’t implement the entire API, just allows tweets with URL shortening.  The module can be incorporated into your project or used to tweet from the command line:

echo "My latest tweet is very interesting!" | ./twitter.py -uUSERNAME -pPASSWORD

To enable URL shortening, just surround your URL with periods like this:

echo "My blog is at ….http://blog.drskippy.net…. Visit often!" |  ./twitter.py -uUSERNAME -pPASSWORD

I picked up the core of this code from Robert Dudley (TweetCLI).  I made some modifications and he granted permission for me to pass everything on.  Robert has started a Google Code Project to house the latest at:

http://code.google.com/p/tweetclipy/

I hope you find this useful!

P.S. You can follow me at DrSkippy27 on twitter.

Advertisements
No comments yet

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: