In a mongo command line I can run
mongo
db.my_collection.stats()
I need to get my collections stats from Python so I t
Python
from pymongo import MongoClient client = MongoClient() db = client.test_database print(db.command("collstats", "test_collection"))