MCPcopy Index your code
hub / github.com/MongoEngine/mongoengine / get_as_pymongo

Function get_as_pymongo

tests/utils.py:32–34  ·  view source on GitHub ↗

Fetch the pymongo version of a certain Document

(doc)

Source from the content-addressed store, hash-verified

30
31
32def get_as_pymongo(doc):
33 """Fetch the pymongo version of a certain Document"""
34 return doc.__class__.objects.as_pymongo().get(id=doc.id)
35
36
37def requires_mongodb_lt_42(func):

Calls 2

as_pymongoMethod · 0.80
getMethod · 0.45