Learn to Write Your Own Twitter Client in Python
Akkana Peck has an awesome guide to writing your own Twitter client in Python. The timing of this article is perfect because I’m now using Empathy and I currently don’t know of any plugins to let me follow and post to Twitter.
What do you need?
- python-twitter (source:https://code.google.com/p/python-twitter/)
- SimpleJSON (source: https://cheeseshop.python.org/pypi/simplejson)
- Tkinter or python-tk
Akkana Peck’s guide teaches you what to write, line by line. Hers might be a simple Twitter client but it’s functional. Her guide teaches you what packages are needed, what the commands are for, and which variables are customizable. The guide also notes which lines of code must not be indented or else it will be part of the loop that might end up going on more than is expected.
If you don’t want to use clients that require Adobe Air, her Python scripts are quite interesting and useful. I really didn’t want to go through the hassle of having a graphical client like Gwibber because I find it too heavy to load on my netbook. The Python scripts seem logical for me to use because I am not always on Twitter and I mainly like to follow people instead of posting tweets myself. All of them are actually available on her site and because those scripts are all available for tweaking, you might end up learning a lot about Twitter and improving the client scripts to suit your needs. (Admit it, you’re probably hooked on to Twitter too! And so you must have a personalized Twitter client.)
Akkana Peck also happens to have written a guide to GIMP. It’s interesting because she had beginners as well as professionals in mind. Might be great to follow her on Twitter as well as check out her other written works.
Good luck with Python programming your client. I could imagine that the guide she wrote could be the start of your own Python programming exercises, especially for those who want to learn on their own time.