@gen.engine
def ListAllKeys(store, callback, prefix=None, marker=None, batch_size=1000):
 batch_size = min(1000, batch_size)
 keys = []
 done = False
 while (not done):
  new_keys = (yield gen.Task(store.ListKeys, prefix=prefix, marker=marker, maxkeys=batch_size))
  keys.extend(new_keys)
  if (len(new_keys) < batch_size):
   break
  marker = new_keys[(-1)]
 callback(keys)

@ gen . engine def ListAllKeys ( store , callback , prefix = None , marker = None , batch_size = 1000 ) : batch_size = min ( 1000 , batch_size ) keys = [ ] done = False while ( not done ) : new_keys = ( yield gen . Task ( store . ListKeys , prefix = prefix , marker = marker , maxkeys = batch_size ) ) keys . extend ( new_keys ) if ( len ( new_keys ) < batch_size ) : break marker = new_keys [ ( - 1 ) ] callback ( keys )
list all keys .