EOSConf

class pyEOS.config.EOSConf(name)

You will probably not have to bother that much about this module yourself as it is usually easier to parse the configuration from a file and then use the “load_config” methods on the EOS class to get this object populated. However, if you understand how the eAPI handles the configuration in JSON mode you should be able to manipulate it in the same way.

Parameters:name – Name of the configuration
compare_config(other)

This method will compare the self object with the other object. The other object will be the target of the comparison.

Parameters:other – Configuration object you want to do the comparison with.
Returns:A string representation of the changes between the self object and other.
load_config(filename=None, config=None)

Reads the configuration from a file or from a string and loads the object. If you send both a filename and a string containing the configuration, the file takes precedence.

Parameters:
  • filename – Path to the file containing the desired configuration. By default is None.
  • config – String containing the desired configuration.
to_string()
Returns:A string representation of the configuration.