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.2.tar.gz (24.3 kB view details)

Uploaded Source

Built Distributions

twython-1.2.win32.exe (90.1 kB view details)

Uploaded Source

twython-1.2.macosx-10.5-i386.tar.gz (51.8 kB view details)

Uploaded Source

twython-1.2-py2.5.egg (57.1 kB view details)

Uploaded Egg

File details

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

File metadata

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

File hashes

Hashes for twython-1.2.tar.gz
Algorithm Hash digest
SHA256 26d5cfadb0d70330bb7049cbb05bef0a88a20e9c87537d467aa572302ba4b0f7
MD5 672c8bf14409f095a69015e9c77a2e5d
BLAKE2b-256 b9fb7c10a0b22106c70a16c2ff35fa6b701b3ea670b91a44dd6bb7c6cee63b27

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for twython-1.2.win32.exe
Algorithm Hash digest
SHA256 6023ca468ff5f2ca8105c180aef5a581c90e0cb131eaf5ec38aee9f84e7bba67
MD5 29a9da138e889997baaa9a989e1a59ce
BLAKE2b-256 a0b71f6d8fce3b58010e9bf2ebd3ef53bc926fa68143cf8472f86a3b402ebe25

See more details on using hashes here.

File details

Details for the file twython-1.2.macosx-10.5-i386.tar.gz.

File metadata

File hashes

Hashes for twython-1.2.macosx-10.5-i386.tar.gz
Algorithm Hash digest
SHA256 ab6a55388cc8aa8aed5e31b05099b6677e02b914311d963638e326c769f6c81a
MD5 6ea6bee19151a2fe08850eb14b99224d
BLAKE2b-256 a107ff23639f6c23accdc58578ead0d546592faf531b9eb29d86931aeeb9e4be

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for twython-1.2-py2.5.egg
Algorithm Hash digest
SHA256 3febd5f4706164ac8dbcd5557d053e8fb25f1a12dab66e155c83f288b1f3ded6
MD5 f187817e86dbaa7db8f38c796e7fb91e
BLAKE2b-256 f259bbac1f5219269a1e9d5eaaaa4caf1fe0909d33b4c2e317c0d3c957ba07e2

See more details on using hashes here.

Supported by

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