Skip to content

Instantly share code, notes, and snippets.

@naiquevin
naiquevin / tw.py
Created September 14, 2013 07:55
Twython wrapper for app authenticated requests to twitter api
from twython import Twython
## Defining access_token as a function so that the token may be cached
## using a decorator as follows,
##
## get_access_token = cache_textfile('.twython-token')(access_token)
##
def access_token(auth_client):
return auth_client.obtain_access_token()