ooici/coi-services — pull request #268 by swarbhanu (2012-09-04 00:09:16+00:00)
Title: Yaml params

The module, parameter_yaml_IO.py, dumps parameter context objects to a yml,param_context_defs.yml, using the method,
dump_param_contexts_to_yml().

After the parameter contexts are dumped to their yml, one can use, the method,
get_param_dict(param_dict_name), to load the ParameterDictionary object as laid out in
param_dict_defs.yml.

An example file for param_dict_defs.yml would contain:
sample_param_dict: ['lat', 'lon', 'time', 'depth', 'salinity', 'temp']

Usage:

from ion.util.parameter_yaml_IO import dump_param_contexts_to_yml, get_param_dict
dump_param_contexts_to_yml()

pdict = get_param_dict('sample_param_dict')
pdict_as_python_dictionary = pdict.dump()