python - How do I iterate over collections in a database in mongoengine? -
is possible iterate on collections in mongoengine. have collections named log_xxx , i'd find of them.
mongoengine built on top of pymongo, can can in pymongo.
for example,
class example(document): pass db = example._get_db() collection_name in db.collection_names(): print collection_name
Comments
Post a Comment