Trees | Indices | Help |
---|
|
Store and retrieve a credential to and from the App Engine datastore. This Storage helper presumes the Credentials have been stored as a CredentialsProperty or CredentialsNDBProperty on a datastore model class, and that entities are stored by key_name.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
|||
Inherited from |
|
Constructor for Storage. Args: model: db.Model or ndb.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 or CredentialsNDBProperty. cache: memcache, a write-through cache to put in front of the datastore. If the model you are using is an NDB model, using a cache will be redundant since the model uses an instance cache and memcache for you. user: users.User object, optional. Can be used to grab user ID as a key_name if no key name is specified.
|
Determine whether the model of the instance is an NDB model. Returns: Boolean indicating whether or not the model is an NDB or DB model. |
Retrieve entity from datastore. Uses a different model method for db or ndb models. Returns: Instance of the model corresponding to the current storage object and stored using the key name of the storage object. |
Delete entity from datastore. Attempts to delete using the key_name stored on the object, whether or not the given key is in the datastore. |
Retrieve Credential from datastore. Returns: oauth2client.Credentials
|
Write a Credentials to the datastore. Args: credentials: Credentials, the credentials to store.
|
Delete Credential from datastore.
|
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Tue Aug 6 12:16:45 2013 | http://epydoc.sourceforge.net |