Skip to content

Instantly share code, notes, and snippets.

@ajamaica
Created November 8, 2013 18:42
Show Gist options
  • Save ajamaica/7375558 to your computer and use it in GitHub Desktop.
Save ajamaica/7375558 to your computer and use it in GitHub Desktop.
Query de App Engine en Python a dict para json. Después solo usa json.
def gql_json_parser(query_obj):
result = []
for entry in query_obj:
result.append(dict([(p, unescape(unicode(getattr(entry, p)))) for p in entry.properties()]))
return result
@digaresc
Copy link

digaresc commented Nov 8, 2013

Excelente!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment