How to read through collection in chunks by 1000? <p>I need to read whole collection from MongoDB ( collection name is "test" ) in Python code. I tried like </p> <pre><code> self.__connection__ = Connection('localhost',27017) dbh = self.__connection__['test_db'] collection = dbh['test'] </code></pre> <p>How to read through collection in chunks by 1000 ( to avoid memory overflow because collection can be very large ) ? </p>