Monday, October 4, 2010

Beat AppEngine get limit (offline mode)

def get_entities(kind):
c = None
es = []
while True:
q = kind.all()
if c: q.with_cursor(c)
i = q.fetch(1000)
es.extend(i)
if not i: break
c = q.cursor()
return es

1 comment:

Jonas Bentzen said...
This comment has been removed by the author.