Sorting Google Cloud Datastore models by key

Thu, 18 January 2018

sort.py
find = MyModel.query(
).fetch(
    limit=1000
)
if len(find) > 0:
    find.sort(key=lambda x: x.myKeyNameToSortOn, reverse=False)