Handy for storing dictionaries or other custom data types
Disadvantages:
- pickling takes time
- not indexable
Source:
from google.appengine.ext import db
import pickle
class PickleProperty(db.Property):
def get_value_for_datastore(self, model_instance):
value = getattr(model_instance,
self.name, None)
return pickle.dumps(value)
def make_value_from_datastore(self, value):
return pickle.loads(value)