Home

Awesome

python-tuenti

Build Status Pypi Package Downloads

Overview

Wrapper around the latest Tuenti API.

Installation

Install using pip, including any optional packages you want...

$ pip install python-tuenti

...or clone the project from github.

$ git clone git@juanriaza/python-tuenti.git
$ cd python-tuenti
$ pip install -r requirements.txt

How to use it?

With your credentials:

from tuenti import TuentiSocialMessenger

user = 'yosoycani@hotmail.com'
password = 'olakase'

t = TuentiSocialMessenger.from_credentials(user, password)

…or you can retrieve some auth data and save it for later…

auth_token, installation_id = t.get_auth_data()

…to use the API without your credentials:

t = TuentiSocialMessenger.from_auth_token(user, auth_token, installation_id)

And fire some requests:

# single request
data = t.request('Feed_getShareFeed', {'max': 20})

# with a shortcut
data = t.Feed_getShareFeed({'max': 20})

# multiple request
data = t.mrequest(('User_getRelationshipData'), ('Feed_getShareFeed', {'max': 20}), ...)

All the available requests are documented here.

Running the tests

$ ./test_tuenti.py

Changelog

1.1.0

27th Nov 2013

1.0.0

9th Jan 2012