Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to export data from mongodb python


import pymongo
 
client = pymongo.MongoClient("mongodb://localhost:27017/")
 
# Database Name
db = client["database"]
 
# Collection Name
col = db["YOUR_COLLECTION_NAME"]
 
#  Find All: It works like Select * query  of SQL. 
x = col.find()
 
for data in x:
    print(data)
 
PREVIOUS NEXT
Tagged: #export #data #mongodb #python
ADD COMMENT
Topic
Name
4+1 =