Skip to main content

An easy (and up to date) way to access Twitter data with Python.

Project description

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.core.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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

twython-1.0.tar.gz (23.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

twython-1.0.win32.exe (88.6 kB view details)

Uploaded Source

twython-1.0-py2.5.egg (53.8 kB view details)

Uploaded Egg

File details

Details for the file twython-1.0.tar.gz.

File metadata

  • Download URL: twython-1.0.tar.gz
  • Upload date:
  • Size: 23.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for twython-1.0.tar.gz
Algorithm Hash digest
SHA256 2518c724637d70e0876e524875d9e337a86d732200cec6c915cebd743124a5f5
MD5 9d19092cb645b294d302b0da3c9569ec
BLAKE2b-256 a94f4eb1530fcdac1c9f6ece3fe7fc93bede9d10928fb28cdd0a0e78335d7436

See more details on using hashes here.

File details

Details for the file twython-1.0.win32.exe.

File metadata

  • Download URL: twython-1.0.win32.exe
  • Upload date:
  • Size: 88.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for twython-1.0.win32.exe
Algorithm Hash digest
SHA256 e3f43b353a0fe034cd33d45f84b1cf62af11e2e53ea5fd8952be8c0cd13c167f
MD5 ae5676c533557c46fe9c01f58e4166a8
BLAKE2b-256 88f3c96b917d1a3c5405cd25348f8f59930f2eeaa2eda357bc34eacb9cf542f2

See more details on using hashes here.

File details

Details for the file twython-1.0-py2.5.egg.

File metadata

  • Download URL: twython-1.0-py2.5.egg
  • Upload date:
  • Size: 53.8 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for twython-1.0-py2.5.egg
Algorithm Hash digest
SHA256 7e225d9850fbb90aee8ccc82e8c948e667826380c64ccfc146519335a2015325
MD5 8c2052a0a218a0e685bc86e28dd732e6
BLAKE2b-256 f147494241331bf35a4460f29f52be03f7bbe50b1534826a58eb51a8bfd0205c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page