![]() |
App Engine Python SDK
v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
|
Public Member Functions | |
def | __init__ |
def | get_value_for_datastore |
def | make_value_from_datastore |
def | validate |
def | empty |
def | default_value |
![]() | |
def | __init__ |
def | validate |
![]() | |
def | __init__ |
def | __property_config__ |
def | __get__ |
def | __set__ |
def | default_value |
def | validate |
def | empty |
def | get_value_for_datastore |
def | get_updated_value_for_datastore |
def | make_value_from_datastore_index_value |
def | make_value_from_datastore |
def | datastore_type |
Public Attributes | |
data_type | |
![]() | |
verbose_name | |
name | |
default | |
required | |
validator | |
choices | |
indexed | |
creation_counter | |
model_class | |
Additional Inherited Members | |
![]() | |
int | creation_counter = 0 |
data_type = str | |
Property type for storing json representation of data. Requires data types to implement two methods: to_json(self): convert data to json-compatible datastructure (dict, list, strings, numbers) @classmethod from_json(cls, json): load data from json-compatible structure.
def google.appengine.ext.mapreduce.json_util.JsonProperty.__init__ | ( | self, | |
data_type, | |||
default = None , |
|||
kwargs | |||
) |
Constructor. Args: data_type: underlying data type as class. default: default value for the property. The value is deep copied fore each model instance. **kwargs: remaining arguments.
def google.appengine.ext.mapreduce.json_util.JsonProperty.default_value | ( | self | ) |
Create default model value. If default option was specified, then it will be deeply copied. None otherwise. Returns: default model value.
def google.appengine.ext.mapreduce.json_util.JsonProperty.empty | ( | self, | |
value | |||
) |
Checks if value is empty. Args: value: model value. Returns: True passed value is empty.
def google.appengine.ext.mapreduce.json_util.JsonProperty.get_value_for_datastore | ( | self, | |
model_instance | |||
) |
Gets value for datastore. Args: model_instance: instance of the model class. Returns: datastore-compatible value.
def google.appengine.ext.mapreduce.json_util.JsonProperty.make_value_from_datastore | ( | self, | |
value | |||
) |
Convert value from datastore representation. Args: value: datastore value. Returns: value to store in the model.
def google.appengine.ext.mapreduce.json_util.JsonProperty.validate | ( | self, | |
value | |||
) |
Validate value. Args: value: model value. Returns: Whether the specified value is valid data type value. Raises: BadValueError: when value is not of self.data_type type.