ctdclient.configurationhandler module

class ctdclient.configurationhandler.ConfigurationFile(path_to_config)[source]

Bases: object

A python representation of the configuration file, ctdclient.toml . The individual key value pairs can be targeted via basic dict-like chaining of keys, e.g.: config[‘user’][‘processing’][‘psas’]

read_config(ctd_type=None)[source]
read_ctd_config(ctd_type)[source]
set_config(ctd_type)[source]
write(current_platform=None, use_internal_values=True, path_to_write=None)[source]

Writes changes to the configuration file to the disk.

Parameters:

path_to_write – (Default value = None)

modify(key, value)[source]

Modifies the configuration values inside of this python representation. Does not write anything to disk.

Parameters:
  • key

  • value

reload()[source]

Reopens the configuration file.

exception ctdclient.configurationhandler.InvalidConfigFile(message)[source]

Bases: Exception

Raise when config is missing a critical value