| Trees | Indices | Help |
|---|
|
|
stored in db as a string:
"python3-marshmallow 2.0.0b5
python-marshmallow 2.0.0b5"
we would represent them as
{ name: "pkg", version: "pkg version" }
we implement only the serialization, since field is read-only
|
|||
|
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
Serializes ``value`` to a basic Python datatype. Noop by default. Concrete :class:`Field` classes should implement this method. Example: :
class TitleCase(Field):
def _serialize(self, value, attr, obj):
if not value:
return ''
return unicode(value).title()
:param value: The value to be serialized. :param str attr: The attribute or key on the object to be serialized. :param object obj: The object the value was pulled from. :raise ValidationError: In case of formatting or validation failure. :return: The serialized value
|
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 | http://epydoc.sourceforge.net |