App Engine Entity to Dictionary
Having an entity called foo
try with:
foo.__dict__
try this. Where "m" is the instance of the Expando you wish to turn into a dictionary.
dict([(x,getattr(m,x)) for x in m.dynamic_properties()])
This should work
from google.appengine.ext import db
db.to_dict(entity)