Twython-Django
(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.
Installation
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://github.com/ryanmcgrath/twython-django.git
cd twython
python setup.py install
Getting Started
Add twython_django_oauth to your INSTALLED_APPS in your settings.py 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 urls.py:
(r'^your_url_extension/', include('twython_django_oauth.urls')),
Modify settings.py
Add the following settings to your settings.py
TWITTER_KEY = 'your_key'
TWITTER_SECRET = 'your_secret'
LOGIN_URL='/your_url_extension/login'
LOGOUT_URL='/your_url_extension/logout'
LOGIN_REDIRECT_URL='/'
LOGOUT_REDIRECT_URL='/'
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/endpoints.py 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 ryan@venodesigns.net.
Or contact me on Twitter:
Metadata
Release files for twython-django 1.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| twython-django-1.5.2.tar.gz | 5.1 kB | Without provenance | Details for twython-django-1.5.2.tar.gz |
Release files / twython-django-1.5.2.tar.gz
| Download URL | twython-django-1.5.2.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f4192186e346beac7fca3e0050999c3834c549274d35d1629c2a5f2544924fff
|
|
BLAKE2b-256 checksum How to use checksums |
0fb40f93a1ac3d6c691e9b17d9a6eb7793e54a047ee7da4b20dea0a4e5e0205b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for twython-django 1.5.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.