| 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 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.
|
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Mon Sep 12 06:06:13 2016 | http://epydoc.sourceforge.net |