footings.model.def_meta¶
-
def_meta
(*, meta: Any, dtype: Optional[Any] = None, description: Optional[str] = None, converter: Optional[callable] = None, validator: Optional[callable] = None, **kwargs)[source]¶ Define a meta attribute under the model.
A meta attribute is a frozen attribute that is passed on instantiation of the model.
- Parameters
meta (Any) – The meta value to pass to the model.
dtype (Optional[Any]) – The expected type of the attribute. If not None, value will be validated on instantiation.
description (Optional[str]) – Optional description to add.
converter (Optional[callable]) – Optional callable that is used to convert value to desired format.
validator (Optional[callable]) – Optional callaable that is used to validate value.
kwargs – Advanced options to pass through to attrs.attrib.