Answers for "python check mognodb size"

0

python check mognodb size

from pymongo 
import MongoClient  
client = MongoClient() 
db = client.test  
# print collection statistics 
# events is the collection name here 
print(db.command("collstats", "events"))
# print database statistics 
print(db.command("dbstats"))
Posted by: Guest on March-08-2021

Python Answers by Framework

Browse Popular Code Answers by Language