myData
- class zdm.data_class.myData[source]
Bases:
objectMethods Summary
from_dict(param_dict)from_jsonfile(jfile)Load from a JSON file
from_jsonstr(jsonstr)Generate a simple dict for parameters
to_dict()Generate a dict holding all of the object parameters
update_param(param, value)Update the value of a single parameter
update_param_dict(params)update_params(params)Update the state parameters using the input dict
vet(obj, dmodel[, verbose])Vet the input object against its data model
write(outfile)Write the parameters to a JSON file
Methods Documentation
- classmethod from_jsonfile(jfile: str)[source]
Load from a JSON file
- Parameters:
jfile (str) – name of the JSON file
- Return type:
- to_dict()[source]
Generate a dict holding all of the object parameters
- Returns:
[description]
- Return type:
- update_param(param: str, value)[source]
Update the value of a single parameter
- Parameters:
param (str) – name of the parameter
value – value
- update_params(params: dict)[source]
Update the state parameters using the input dict
- Parameters:
params (dict) – New parameters+values
- write(outfile: str)[source]
Write the parameters to a JSON file
- Parameters:
outfile (str) – name of output file
- classmethod from_jsonfile(jfile: str)[source]
Load from a JSON file
- Parameters:
jfile (str) – name of the JSON file
- Return type:
- __getitem__(attrib: str)[source]
Enables dict like access to the state
- Parameters:
attrib (str) – name of the attribute
- Returns:
Value of the attribute requested
- Return type:
?
- update_params(params: dict)[source]
Update the state parameters using the input dict
- Parameters:
params (dict) – New parameters+values
- update_param(param: str, value)[source]
Update the value of a single parameter
- Parameters:
param (str) – name of the parameter
value – value
- to_dict()[source]
Generate a dict holding all of the object parameters
- Returns:
[description]
- Return type:
- write(outfile: str)[source]
Write the parameters to a JSON file
- Parameters:
outfile (str) – name of output file