app.serializers.role.RoleName

class app.serializers.role.RoleName(*, load_default: Any = <marshmallow.missing>, missing: Any = <marshmallow.missing>, dump_default: Any = <marshmallow.missing>, default: Any = <marshmallow.missing>, data_key: Optional[str] = None, attribute: Optional[str] = None, validate: Optional[Union[Callable[[Any], Any], Iterable[Callable[[Any], Any]]]] = None, required: bool = False, allow_none: Optional[bool] = None, load_only: bool = False, dump_only: bool = False, error_messages: Optional[Dict[str, str]] = None, metadata: Optional[Mapping[str, Any]] = None, **additional_metadata)

Bases: marshmallow.fields.Field

Attributes

RoleName.context

The context dictionary for the parent Schema.

RoleName.default

RoleName.default_error_messages

Default error messages for various kinds of errors.

RoleName.missing

RoleName.name

RoleName.parent

RoleName.root

Methods

RoleName.__init__(*[, load_default, ...])

RoleName.deserialize(value[, attr, data])

Deserialize value.

RoleName.fail(key, **kwargs)

Helper method that raises a ValidationError with an error message from self.error_messages.

RoleName.get_value(obj, attr[, accessor, ...])

Return the value for a given key from an object.

RoleName.make_error(key, **kwargs)

Helper method to make a ValidationError with an error message from self.error_messages.

RoleName.serialize(attr, obj[, accessor])

Pulls the value for the given key from the object, applies the field's formatting and returns the result.