Skip to content Skip to sidebar Skip to footer

Update An Entity In Datastore App Engine

Possible Duplicate: Update app engine entity I need to update entity that I loaded from the datastore. But how?

Solution 1:

Here you go

myKey = db.Key.from_path('MyModel', 'mykeyvalue')
rec = db.get(myKey)

rec.MyProperty = 'this is a new value'
rec.put()

Here is a link to the documentation.

http://code.google.com/appengine/docs/python/datastore/entities.html

Post a Comment for "Update An Entity In Datastore App Engine"