libturpial  1.7.0
About: Turpial Core/Backend parts. Turpial is a lightweight microblogging client for multiple platforms (for e.g. Twitter; written in Python).
  Fossies Dox: libturpial-1.7.0.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

libturpial Documentation

Some Fossies usage hints in advance:

  1. To see the Doxygen generated documentation please click on one of the items in the steelblue colored "quick index" bar above or use the side panel at the left which displays a hierarchical tree-like index structure and is adjustable in width.
  2. If you want to search for something by keyword rather than browse for it you can use the client side search facility (using Javascript and DHTML) that provides live searching, i.e. the search results are presented and adapted as you type in the Search input field at the top right.
  3. Doxygen doesn't incorporate all member files but just a definable subset (basically the main project source code files that are written in a supported language). So to search and browse all member files you may visit the Fossies
  4. libturpial-1.7.0.tar.gz contents page and use the Fossies standard member browsing features (also with source code highlighting and additionally with optional code folding).




Summary: A powerful microblogging library written in Python

libturpial is a library that handles multiple microblogging protocols. It implements a lot of features and aims to support all the features for each protocol. At the moment it supports Twitter and and is the backend used for Turpial.

Currently libturpial is in heavy development, so probably you will find bugs or undesired behavior. In this cases please report issues at:

We will be very graceful for your contributions.


libturpial source code, images and sounds have been released under the GPL v3 License. Please check the COPYING file for more details or visit


libturpial needs this packages to work properly:

  • python >= 2.5
  • simplejson >= 1.9.2 (python-simplejson)
  • oauth (python-oauth)
  • requests (python-requests)
  • setuptools (python2-distribute)
  • pkg-resources


libturpial should be available on most popular Linux distributions, so you are able to install it using your favorite package manager (aptitude, apt-get, pacman, yum). Please visit for more information.

To install libturpial from sources you should go to source folder and run (as superuser):

# python install

or using sudo:

$ sudo python install

Usage Introduction

In this example we will create an account, do the OAuth authentication and then register the account in libturpial. First, let's create the account and request the OAuth access:

from libturpial.api.core import Core
from libturpial.api.models.account import Account

account ='twitter')
url = account.request_oauth_access()
print url

Visit the URL showed before and authorize Turpial, then copy the pin and continue with this steps:


c = Core()
acc_id = c.register_account(account)

Now you have an account registered. You can then use all the methods availables in For example to send a tweet:

c.update_status(acc_id,"New Tweet sent using #libturpial").

or if you want to get your timeline:

timeline = c.get_column_statuses(acc_id, 'timeline')
for status in timeline:
    print "@%s: %s" % (status.username, status.text)

Next time you want to use your account you don't need to repeat the whole OAuth process again, just load Core and you will have you account available through the account_id. For more information check the next section


To generate the documentation and learn how to use libturpial install sphinx and run:

$ sphinx-build -a -b html docs/ my_output_folder/

Then check index.html in my_output_folder

Further Information

For more information visit our FAQ page


You can follow libturpial news from our official Twitter account:

  • @TurpialVe

Join to the official development mailing list:

Or mail us to say what an awesome/crappy app libturpial is. Our contact info is in:

You love libturpial and want to show us how gracefull you are? Buy us a coffee :)

PayPal donations at: