def serialize(self, value, entity=None, request=None):

    ret = self.from_python(value)
    self.validate(ret)
    self.run_validators(value)
    return ret
Validate and serialize the value.
dataset/ETHPy150Open wuher/devil/devil/fields/__init__.py/serialize