Actively maintained, pure Python wrapper for the Twitter API. Supports both normal and streaming Twitter APIs. http://stackoverflow.com/questions/tagged/twython
Find a file
2009-12-17 01:58:28 -05:00
build/lib Twython 0.9 - enough has changed with the Twitter API as of late that this merits a new release. 0.8 was beginning to show age as the API moved forward, and is now deprecated as a result - 0.9 is the way to go (or trunk, if you're adventurous. ;D) 2009-11-23 22:03:21 -05:00
dist Twython 0.9 - enough has changed with the Twitter API as of late that this merits a new release. 0.8 was beginning to show age as the API moved forward, and is now deprecated as a result - 0.9 is the way to go (or trunk, if you're adventurous. ;D) 2009-11-23 22:09:30 -05:00
examples oops my bad. fixed the examples properly this time 2009-10-11 19:31:23 -04:00
twython.egg-info Twython 0.9 - enough has changed with the Twitter API as of late that this merits a new release. 0.8 was beginning to show age as the API moved forward, and is now deprecated as a result - 0.9 is the way to go (or trunk, if you're adventurous. ;D) 2009-11-23 22:03:21 -05:00
twythonoauth Simple Django app skeleton for OAuth testing; currently doesn't do anything special, just wanted it in the repo for testing purposes. 2009-09-24 04:05:38 -04:00
__init__.py Alright, now import twython works as it should. 2009-08-06 02:57:02 -04:00
LICENSE Changed licensing, modified contents of setup.py to conform to what Pypi wants/needs 2009-07-28 23:22:52 -04:00
oauth.py Including a version (1.0) of oauth.py for Twython experiments. Override at your own discretion/risk. :D 2009-09-04 00:21:00 -04:00
README.markdown Changing simplejson requirement notice (Python 2.6 doesn't need it) 2009-12-17 01:58:28 -05:00
setup.py Twython 0.9 - enough has changed with the Twitter API as of late that this merits a new release. 0.8 was beginning to show age as the API moved forward, and is now deprecated as a result - 0.9 is the way to go (or trunk, if you're adventurous. ;D) 2009-11-23 22:03:21 -05:00
twython.py Proxy authentication support for Twython. Experimental, needs testing - pass a proxy object (username/password/host/port) to the setup method, Twython will try and route everything through the proxy and properly handle things. Headers can now be added to un-authed requests; proxies also work with both authed/un-authed requests. 2009-12-10 03:14:33 -05:00
twython3k.py Proxy authentication support for Twython. Experimental, needs testing - pass a proxy object (username/password/host/port) to the setup method, Twython will try and route everything through the proxy and properly handle things. Headers can now be added to un-authed requests; proxies also work with both authed/un-authed requests. 2009-12-10 03:14:33 -05:00
twython_oauth.py updateStatus() now supports latitude/longitude parameters for Twitter's API; OAuth functionality moved out of Twython core and into it's own module. This should solve the annoying problems people were running into with OAuth-include related problems when they never wanted/needed OAuth in the first place. 2009-11-20 04:16:42 -05:00
twython_streaming.py updateStatus() now supports latitude/longitude parameters for Twitter's API; OAuth functionality moved out of Twython core and into it's own module. This should solve the annoying problems people were running into with OAuth-include related problems when they never wanted/needed OAuth in the first place. 2009-11-20 04:16:42 -05:00

Twython - Easy Twitter utilities in Python

I wrote Twython because I found that other Python Twitter libraries weren't that up to date. Certain things like the Search API, OAuth, etc, don't seem to be fully covered. This is my attempt at a library that offers more coverage.

This is my first library I've ever written in Python, so there could be some stuff in here that'll make a seasoned Python vet scratch his head, or possibly call me insane. It's open source, though, and I'm open to anything that'll improve the library as a whole.

OAuth and Streaming API support is in the works, but every other part of the Twitter API should be covered. Twython handles both Basic (HTTP) Authentication and OAuth (Older versions (pre 0.9) of Twython need Basic Auth specified - to override this, specify 'authtype="Basic"' in your twython.setup() call).

Twython has Docstrings if you want function-by-function plays; otherwise, check the Twython Wiki or Twitter's API Wiki (Twython calls mirror most of the methods listed there).

Requirements

Twython (for versions of Python before 2.6) requires a library called "simplejson". You can grab it at the following link:

http://pypi.python.org/pypi/simplejson

Installation

Installing Twython is fairly easy. You can...

easy_install twython

...or, you can clone the repo and install it the old fashioned way.

git clone git://github.com/ryanmcgrath/twython.git
cd twython
sudo python setup.py install

Example Use

import twython

twitter = twython.setup(username="example", password="example")
twitter.updateStatus("See how easy this was?")

Twython 3k

There's an experimental version of Twython that's made for Python 3k. This is currently not guaranteed to work, but it's provided so that others can grab it and hack on it. If you choose to try it out, be aware of this.

Questions, Comments, etc?

My hope is that Twython is so simple that you'd never have to ask any questions, but if you feel the need to contact me for this (or other) reasons, you can hit me up at ryan@venodesigns.net.

Twython is released under an MIT License - see the LICENSE file for more information.