python-twitter

python-twitter is a Python wrapper around the Twitter API.
Download

python-twitter Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • DeWitt Clinton
  • Publisher web site:
  • http://code.google.com/p/python-twitter/

python-twitter Tags


python-twitter Description

python-twitter is a Python wrapper around the Twitter API. python-twitter is a Python wrapper around the Twitter API.This library provides a pure python interface for the Twitter API.Twitter provides a service that allows people to connect via the web, IM, and SMS. Twitter exposes a web services API and this library is intended to make it even easier for python programmers to use.BuildingFrom source:Install the dependencies: http://cheeseshop.python.org/pypi/simplejsonDownload the latest python-twitter library from: http://code.google.com/p/python-twitter/ Untar the source distribution and run: $ python setup.py build $ python setup.py installTestingWith setuptools installed: $ python setup.py testWithout setuptools installed: $ python twitter_test.pyUsage:The library provides a python wrapper around the Twitter API and the twitter data model.Model:The three model classes are twitter.Status, twitter.User, and twitter.DirectMessage. The API methods return instances of these classes.To read the full API for twitter.Status, twitter.User, or twitter.DirectMessage, run: $ pydoc twitter.Status $ pydoc twitter.User $ pydoc twitter.DirectMessageAPI:The API is exposed via the twitter.Api class.To create an instance of the twitter.Api class: >>> import twitter >>> api = twitter.Api()To create an instance of the twitter.Api with login credentials (many API calls required the client to be authenticated): >>> api = twitter.Api(username='username', password='password) To fetch the most recently posted public twitter status messages: >>> statuses = api.GetPublicTimeline() >>> print To fetch a single user's public status messages, where "user" is either a Twitter "short name" or their user id. >>> statuses = api.GetUserTimeline(user) >>> print To fetch a list a user's friends (requires authentication): >>> users = api.GetFriends() >>> print To post a twitter status message (requires authentication): >>> status = api.PostUpdate(username, password, 'I love python-twitter!') >>> print status.text I love python-twitter!There are many more API methods, to read the full API documentation: $ pydoc twitter.Api Requirements: · Python


python-twitter Related Software