Skip to main content

Django Integration for Twython -- the actively maintained, pure Python wrapper for the Twitter API. Supports both normal and streaming Twitter APIs

Project description

(An example Django Python Twitter OAuth Application, using Twython)

OAuth is an annoying specification to work with. Twitter has an awesome and somewhat unique real time data stream, though, and it’d be a shame to miss out on that stuff because of the warts of a specification.

Twython supports OAuth authentication with Twitter now, and this is a sample Django application to get people up and running (fairly) instantly with Twitter OAuth in Django. Enjoy.


Install twython-django via pip

$ pip install twython-django

or, with easy_install

$ easy_install twython-django

But, hey… that’s up to you.

Or, if you want the code that is currently on GitHub

git clone git://
cd twython
python install

Getting Started

Add twython_django_oauth to your INSTALLED_APPS in your file.

If you wish to use the example template, feel free to copy that over as well.

Update urls

Specify the following urlconf in your root

(r'^your_url_extension/', include('twython_django_oauth.urls')),


Add the following settings to your
TWITTER_KEY = 'your_key'
TWITTER_SECRET = 'your_secret'


Need Twython Help?

If you need help with the Twython library itself, check out the project on Github. It’s all pretty self contained (twython/ contains just about every function definition you’ll need):

Questions, Comments, etc?

My hope is that twython-django 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

Or contact me on Twitter:

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-django-1.5.2.tar.gz (5.1 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page