Answers for "mongodb python get all documents"

1

mongodb python get all documents

from pymongo import MongoClient

if __name__ == '__main__':
    client = MongoClient("localhost", 27017, maxPoolSize=50)
    db = client.localhost
    collection = db['chain']
    cursor = collection.find({})
    for document in cursor:
          print(document)
Posted by: Guest on September-01-2021

Code answers related to "mongodb python get all documents"

Python Answers by Framework

Browse Popular Code Answers by Language