Types¶
Type aliases.
Warning
This module is provisional. Types may be modified, added, and removed between minor releases.
- marshmallow.types.ErrorMessageValue: TypeAlias = str | list | dict¶
Type for a single error message value, which can be a string, list, or dict
- marshmallow.types.ErrorMessages(*args, **kwargs)¶
Type for error_messages dictionaries passed to fields
alias of
dict[str,str|list|dict]
- marshmallow.types.PostLoadCallable(*args, **kwargs)¶
Type for field-level post-load functions
alias of
Callable[[T],T]
- marshmallow.types.PreLoadCallable(*args, **kwargs)¶
Type for field-level pre-load functions
alias of
Callable[[Any],Any]
- marshmallow.types.StrSequenceOrSet(*args, **kwargs)¶
A type that can be either a sequence of strings or a set of strings
alias of
Sequence[str] |AbstractSet[str]
- marshmallow.types.UnknownOption(*args, **kwargs)¶
A valid option for the
unknownschema option and argumentalias of
Literal[‘exclude’, ‘include’, ‘raise’]
- marshmallow.types.Validator(*args, **kwargs)¶
Type for validator functions
alias of
Callable[[Any],Any]