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

Method to_python

mongoengine/base/fields.py:217–219  ·  view source on GitHub ↗

Convert a MongoDB-compatible type to a Python type.

(self, value)

Source from the content-addressed store, hash-verified

215 raise ValidationError(message, errors=errors, field_name=field_name)
216
217 def to_python(self, value):
218 """Convert a MongoDB-compatible type to a Python type."""
219 return value
220
221 def to_mongo(self, value):
222 """Convert a Python type to a MongoDB-compatible type."""

Callers 5

to_mongoMethod · 0.95
__set__Method · 0.45
to_pythonMethod · 0.45
__init__Method · 0.45
_from_sonMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected