Skip to content
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. This library is the backend used for Turpial
Branch: development
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



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:


You can’t perform that action at this time.