This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Credits to @wojcikstefan in this thread: https://github.com/MongoEngine/mongoengine/issues/1056 | |
In [14]: from mongoengine.connection import get_db, connect | |
In [15]: connect('testdb') | |
Out[15]: MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True, read_preference=Primary()) | |
In [16]: db = get_db() | |
In [17]: db.command('dbstats') |