from oauth2client.appengine import CredentialsModel
from oauth2client.appengine import StorageByKeyName
credentials = StorageByKeyName(CredentialsModel, user_id, 'credentials').get()
How to make 'access_type=offline' / server-only OAuth2 operations on GAE/Python?