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
104
105
106
def List(  # type: ignore[misc]
    content_type: Any = None, pickled: bool = ..., **kwargs: Any
) -> list[Any]: ...

Dict

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