I’m writing functionality in Python to ensure the existence, type, and size of mongodb collections. Most of these collections are capped. I know that the mongo shell includes mycollection.iscapped(), but pymongo does not seem to support this functionality.
Within the context of pymongo, what is the best way to tell if a collection is capped collection?
Calling
mycollection.options()returns a dict with'capped': Trueif it’s a capped collection.