python check mognodb size

Solutions on MaxInterview for python check mognodb size by the best coders in the world

showing results for - "python check mognodb size"
Moritz
12 Jun 2016
1from pymongo 
2import MongoClient  
3client = MongoClient() 
4db = client.test  
5# print collection statistics 
6# events is the collection name here 
7print(db.command("collstats", "events"))
8# print database statistics 
9print(db.command("dbstats"))
similar questions
queries leading to this page
python check mognodb size