Package coprs :: Package rest_api :: Module schemas :: Class SpaceSeparatedList
[hide private]
[frames] | no frames]

Class SpaceSeparatedList

source code


Instance Methods [hide private]
 
_serialize(self, value, attr, obj)
Serializes ``value`` to a basic Python datatype.
source code
 
_deserialize(self, value, attr=None, data=None)
Deserialize value.
source code

Inherited from marshmallow.fields.Field: __init__, __repr__, deserialize, get_value, serialize

Inherited from marshmallow.fields.Field (private): _add_to_schema, _validate, _validate_missing

Inherited from marshmallow.base.FieldABC: __deepcopy__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from marshmallow.fields.Field (private): _CHECK_ATTRIBUTE, _creation_index

Inherited from marshmallow.base.FieldABC: name, parent

Properties [hide private]

Inherited from marshmallow.fields.Field: context

Inherited from object: __class__

Method Details [hide private]

_serialize(self, value, attr, obj)

source code 

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.

Overrides: marshmallow.base.FieldABC._serialize

_deserialize(self, value, attr=None, data=None)

source code 

Deserialize value. Concrete :class:`Field` classes should implement this method.

:raise ValidationError: In case of formatting or validation failure.

Overrides: marshmallow.base.FieldABC._deserialize