How can I fetch more than 1000 record from data store and put all in one single list to pass to django?
This is close to the solution provided by Gabriel, but doesn't fetch the results it just counts them:
count = 0
q = YourEntityClass.all().filter('myval = ', 2)
countBatch = q.count()
while countBatch > 0:
count += countBatch
countBatch = q.with_cursor(q.cursor()).count()
logging.info('Count=%d' % count)
Works perfectly for my queries, and fast too (1.1 seconds to count 67,000 entities)
Note that the query must not be an inequality filter or a set or the cursor will not work and you'll get this exception:
AssertionError: No cursor available for a MultiQuery (queries using "IN" or "!=" operators)