I have a python dictionary that I would like to store in Google\'s BigTable datastore (it is an attribute in a db.Model
class).
Is there an easy way to do t
I think you cannot avoid serializing your objects.
I would define the following model to store each key, value pair:
class DictModel(db.Model):
value = db.TextProperty()
To save to the datastore I'd use:
def set_value(key, value):
key = DictModel(value=pickle.dumps(value), key_name=key)
key.save()
return key
And to retrieve data:
def get_value(key):
return pickle.loads(DictModel.get_by_key_name(key).value)