snowmobile.core.cfg.base
¶
pydantic Config and Base class for snowmobile.toml and snowmobile-ext.toml objects.
Module Contents¶
Classes¶
Configuration class for object model. | |
Base class for object model parsed from |
- class
snowmobile.core.cfg.base.
Config
¶ Configuration class for object model.
-
extra
¶
-
allow_population_by_field_name
= True¶
-
allow_population_by_alias
= True¶
-
arbitrary_types_allowed
= True¶
-
json_encoders
¶
-
apply_map_by_type
(self, attrs: Dict, typ: Any, func: Callable)¶ Recursively apply function to all items of a dictionary of type ‘typ’.
-
serialize
(self, as_dict: Dict) → Dict¶ Recursively applies json_encoder functions to all items of a dictionary.
-
- class
snowmobile.core.cfg.base.
Base
¶ Bases:
pydantic.BaseModel
,snowmobile.core.cfg.base.Config
Base class for object model parsed from
snowmobile.toml
.- property
configured_args
(self) → Dict¶ Placeholder for configuration arguments of derived classes.
-
kwarg
(self, arg_nm: str, arg_val: Any, arg_typ: Any) → Any¶ Compares a provided keyword argument to a configured keyword argument.
-
from_relative
(self, obj: Any)¶ Updates current object’s attributes with those from a different instance of the same class.
-
from_dict
(self, args: Dict)¶ Accept a dictionary of arguments and updates the current object as if it were instantiated with those arguments.
- property