footings.model.def_parameter

def_parameter(*, dtype: Optional[Any] = None, description: Optional[str] = None, converter: Optional[callable] = None, validator: Optional[callable] = None, **kwargs)[source]

Define a parameter attribute under the model.

A parameter attribute is a frozen attribute that is passed on instantiation of the model.

Parameters
  • 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.