pymongo limit docs esaminated code example Example: mongodb shell limit DBQuery.shellBatchSize = 5000