| |
- __builtin__.object
-
- StorageByKeyName
- google.appengine.ext.db.Property(__builtin__.object)
-
- FlowThreeLeggedProperty
- OAuthCredentialsProperty
class FlowThreeLeggedProperty(google.appengine.ext.db.Property) |
|
Utility property that allows easy
storage and retreival of an
apiclient.oauth.FlowThreeLegged |
|
- Method resolution order:
- FlowThreeLeggedProperty
- google.appengine.ext.db.Property
- __builtin__.object
Methods defined here:
- empty(self, value)
- get_value_for_datastore(self, model_instance)
- # For writing to datastore.
- make_value_from_datastore(self, value)
- # For reading from datastore.
- validate(self, value)
Data and other attributes defined here:
- data_type = <class 'apiclient.oauth.FlowThreeLegged'>
- Does the Three Legged Dance for OAuth 1.0a.
Methods inherited from google.appengine.ext.db.Property:
- __get__(self, model_instance, model_class)
- Returns the value for this property on the given model instance.
See http://docs.python.org/ref/descriptors.html for a description of
the arguments to this class and what they mean.
- __init__(self, verbose_name=None, name=None, default=None, required=False, validator=None, choices=None, indexed=True)
- Initializes this Property with the given options.
Args:
verbose_name: User friendly name of property.
name: Storage name for property. By default, uses attribute name
as it is assigned in the Model sub-class.
default: Default value for property if none is assigned.
required: Whether property is required.
validator: User provided method used for validation.
choices: User provided set of valid property values.
indexed: Whether property is indexed.
- __property_config__(self, model_class, property_name)
- Configure property, connecting it to its model.
Configure the property so that it knows its property name and what class
it belongs to.
Args:
model_class: Model class which Property will belong to.
property_name: Name of property within Model instance to store property
values in. By default this will be the property name preceded by
an underscore, but may change for different subclasses.
- __set__(self, model_instance, value)
- Sets the value for this property on the given model instance.
See http://docs.python.org/ref/descriptors.html for a description of
the arguments to this class and what they mean.
- datastore_type(self)
- Deprecated backwards-compatible accessor method for self.data_type.
- default_value(self)
- Default value for unassigned values.
Returns:
Default value as provided by __init__(default).
- get_updated_value_for_datastore(self, model_instance)
- Determine new value for auto-updated property.
Some properies (e.g. DateTimeProperty, UserProperty) optionally update their
value on every put(). This call must return the new desired value for such
properties. For all other properties, this call must return
AUTO_UPDATE_UNCHANGED.
Args:
model_instance: Instance to get new value for.
Returns:
Datastore representation of the new model value in a form that is
appropriate for storing in the datastore, or AUTO_UPDATE_UNCHANGED.
Data descriptors inherited from google.appengine.ext.db.Property:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from google.appengine.ext.db.Property:
- creation_counter = 0
|
class OAuthCredentialsProperty(google.appengine.ext.db.Property) |
|
Utility property that allows easy
storage and retrieval of
apiclient.oath.OAuthCredentials |
|
- Method resolution order:
- OAuthCredentialsProperty
- google.appengine.ext.db.Property
- __builtin__.object
Methods defined here:
- empty(self, value)
- get_value_for_datastore(self, model_instance)
- # For writing to datastore.
- make_value_from_datastore(self, value)
- # For reading from datastore.
- validate(self, value)
Data and other attributes defined here:
- data_type = <class 'apiclient.oauth.OAuthCredentials'>
- Credentials object for OAuth 1.0a
Methods inherited from google.appengine.ext.db.Property:
- __get__(self, model_instance, model_class)
- Returns the value for this property on the given model instance.
See http://docs.python.org/ref/descriptors.html for a description of
the arguments to this class and what they mean.
- __init__(self, verbose_name=None, name=None, default=None, required=False, validator=None, choices=None, indexed=True)
- Initializes this Property with the given options.
Args:
verbose_name: User friendly name of property.
name: Storage name for property. By default, uses attribute name
as it is assigned in the Model sub-class.
default: Default value for property if none is assigned.
required: Whether property is required.
validator: User provided method used for validation.
choices: User provided set of valid property values.
indexed: Whether property is indexed.
- __property_config__(self, model_class, property_name)
- Configure property, connecting it to its model.
Configure the property so that it knows its property name and what class
it belongs to.
Args:
model_class: Model class which Property will belong to.
property_name: Name of property within Model instance to store property
values in. By default this will be the property name preceded by
an underscore, but may change for different subclasses.
- __set__(self, model_instance, value)
- Sets the value for this property on the given model instance.
See http://docs.python.org/ref/descriptors.html for a description of
the arguments to this class and what they mean.
- datastore_type(self)
- Deprecated backwards-compatible accessor method for self.data_type.
- default_value(self)
- Default value for unassigned values.
Returns:
Default value as provided by __init__(default).
- get_updated_value_for_datastore(self, model_instance)
- Determine new value for auto-updated property.
Some properies (e.g. DateTimeProperty, UserProperty) optionally update their
value on every put(). This call must return the new desired value for such
properties. For all other properties, this call must return
AUTO_UPDATE_UNCHANGED.
Args:
model_instance: Instance to get new value for.
Returns:
Datastore representation of the new model value in a form that is
appropriate for storing in the datastore, or AUTO_UPDATE_UNCHANGED.
Data descriptors inherited from google.appengine.ext.db.Property:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from google.appengine.ext.db.Property:
- creation_counter = 0
|
class StorageByKeyName(__builtin__.object) |
|
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. |
|
Methods defined here:
- __init__(self, model, key_name, property_name)
- 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
- get(self)
- Retrieve Credential from datastore.
Returns:
Credentials
- put(self, credentials)
- Write a Credentials to the datastore.
Args:
credentials: Credentials, the credentials to store.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |