google.appengine.api.datastore_types.PropertyValueFromString

Returns an instance of a property value given a type and string value.

The reverse of this method is just str() and type() of the Python value.

Note that this does not support non-UTC offsets in ISO 8601-formatted datetime strings, e.g., the -08:00 suffix in 2002-12-25 00:00:00-08:00. It only supports -00:00 and +00:00 suffixes, which are UTC.

type_ A Python class.
value_string A string representation of the value of the property.

An instance of type.

ValueError if type_ is datetime and value_string has a timezone offset.