Package oauth2client :: Module appengine :: Class StorageByKeyName
[hide private]
[frames] | no frames]

Class StorageByKeyName

source code


Store and retrieve a single credential to and from
the App Engine datastore.

This Storage helper presumes the Credentials
have been stored as a CredenialsProperty
on a datastore model class, and that entities
are stored by key_name.

Instance Methods [hide private]
 
__init__(self, model, key_name, property_name, cache=None)
Constructor for Storage.
source code
 
locked_get(self)
Retrieve Credential from datastore.
source code
 
locked_put(self, credentials)
Write a Credentials to the datastore.
source code
 
locked_delete(self)
Delete Credential from datastore.
source code

Inherited from client.Storage: acquire_lock, delete, get, put, release_lock

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, model, key_name, property_name, cache=None)
(Constructor)

source code 
Constructor for Storage.

Args:
  model: db.Model, model class
  key_name: string, key name for the entity that has the credentials
  property_name: string, name of the property that is a CredentialsProperty
  cache: memcache, a write-through cache to put in front of the datastore

Overrides: object.__init__

locked_get(self)

source code 
Retrieve Credential from datastore.

Returns:
  oauth2client.Credentials

Overrides: client.Storage.locked_get

locked_put(self, credentials)

source code 
Write a Credentials to the datastore.

Args:
  credentials: Credentials, the credentials to store.

Overrides: client.Storage.locked_put

locked_delete(self)

source code 
Delete Credential from datastore.

Overrides: client.Storage.locked_delete