-
ListField — List that guarauntees no empty values.
-
DictField — Dict field for nested schemas with case insensitive keys and sorting.
-
StringListField — A list of non empty strings.
-
StringSetField — A set of non-empty strings.
-
IntegerListField — A list of integers.
-
LegacyNestedMDStringSetField — Copy data from the legacy special nested field.
comicbox.fields.collection_fields¶
source module comicbox.fields.collection_fields
Marshmallow collection fields.
Classes
Functions
-
case_insensitive_dict — Make a dict with string keys case insensitive.
source case_insensitive_dict(d: dict) → dict
Make a dict with string keys case insensitive.
source class ListField(*args: Any, sort: bool = True, sort_keys: tuple[str, …] | list[str] = (), allow_empty: bool = False, **kwargs: Any)
Bases : fields.List
List that guarauntees no empty values.
Add instance variables.
Methods
-
get_tag_value — Override in XmlListField.
source staticmethod ListField.get_tag_value(value: Any) → Any
Override in XmlListField.
source class DictField(*args: Any, keys: type[fields.Field] | fields.Field = StringField, case_insensitive: bool = True, sort: bool = True, allow_empty_keys: bool = False, allow_empty_values: bool = False, **kwargs: Any)
Bases : fields.Dict
Dict field for nested schemas with case insensitive keys and sorting.
Set flags.
source class StringListField(*args: Any, as_string: bool = False, sort: bool = True, separators: str = ‘’, **kwargs: Any)
Bases : fields.List
A list of non empty strings.
Initialize as a string list.
source class StringSetField()
Bases : StringListField
A set of non-empty strings.
source class IntegerListField(*args: Any, sort: bool = False, **kwargs: Any)
source class LegacyNestedMDStringSetField()
Bases : StringSetField
Copy data from the legacy special nested field.
Methods
-
is_nested_metadata — Return if this looks like a json or xml string.
source classmethod LegacyNestedMDStringSetField.is_nested_metadata(value: Any) → bool
Return if this looks like a json or xml string.