Skip to content

Container fields

List and Dict fields for collection-typed attributes on domain elements.

See Container Fields reference for usage examples.

List

List(
    content_type: Any = None,
    pickled: bool = ...,
    **kwargs: Any,
) -> list[Any]
Source code in src/protean/fields/containers.py
134
135
136
def List(  # type: ignore[misc]
    content_type: Any = None, pickled: bool = ..., **kwargs: Any
) -> list[Any]: ...

Dict

Dict(
    value_type: Any = None, **kwargs: Any
) -> dict[str, Any]
Source code in src/protean/fields/containers.py
138
139
140
def Dict(  # type: ignore[misc]
    value_type: Any = None, **kwargs: Any
) -> dict[str, Any]: ...