MonthlyFourier.model_construct#
- classmethod MonthlyFourier.model_construct(_fields_set=None, **values)#
Creates a new instance of the
Model
class with validated data.Creates a new model setting
__dict__
and__pydantic_fields_set__
from trusted or pre-validated data. Default values are respected, but no other validation is performed.- !!! note
model_construct()
generally respects themodel_config.extra
setting on the provided model. That is, ifmodel_config.extra == 'allow'
, then all extra passed values are added to the model instance’s__dict__
and__pydantic_extra__
fields. Ifmodel_config.extra == 'ignore'
(the default), then all extra passed values are ignored. Because no validation is performed with a call tomodel_construct()
, havingmodel_config.extra == 'forbid'
does not result in an error if extra values are passed, but they will be ignored.- Args:
- _fields_set: A set of field names that were originally explicitly set during instantiation. If provided,
this is directly used for the [
model_fields_set
][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from thevalues
argument will be used.
values: Trusted or pre-validated data dictionary.
- Returns:
A new instance of the
Model
class with validated data.