Package oauth2client :: Module django_orm :: Class Storage
[hide private]
[frames] | no frames]

Class Storage

source code


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

This Storage helper presumes the Credentials
have been stored as a CredenialsField
on a db model class.

Instance Methods [hide private]
 
__init__(self, model_class, key_name, key_value, property_name)
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 Credentials from the 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_class, key_name, key_value, property_name)
(Constructor)

source code 
Constructor for Storage.

Args:
  model: db.Model, model class
  key_name: string, key name for the entity that has the credentials
  key_value: string, key value for the entity that has the credentials
  property_name: string, name of the property that is an CredentialsProperty

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 Credentials from the datastore.

Overrides: client.Storage.locked_delete