fastapi_tools.data_models.basemodel_kwargs
¶
Base model which can be converted to dict at only the top level of attributes.
Useful to send config values using **config.to_kw() to functions.
Classes:
-
BaseModelKwargs–Base model with to_kw method.
BaseModelKwargs
¶
Bases: BaseModel
Base model with to_kw method.
Methods:
-
to_kw–Convert the model to a dictionary, flattening any 'kwargs' attribute.
to_kw
¶
Convert the model to a dictionary, flattening any 'kwargs' attribute.
Parameters:
-
exclude_none(bool, default:False) –Whether to exclude None values. Defaults to False.