pcvs.backend.config module

A configuration dictionary with additional feature.

class pcvs.backend.config.Config(d={})[source]

Bases: dict

A ‘Config’ is a dict used to manage all configuration fields.

While it can contain arbitrary data, the whole PCVS configuration is composed of 5 distinct ‘categories’, each being a single Config. These are then gathered in a MetaConfig object.

Init the object.

Parameters:

d (dict) – items of the configuration

set_ifdef(k, v)[source]

Shortcut function: init self[k] only if v is not None.

Parameters:
  • k (str) – name of value to add

  • v (Any) – value to add

Return type:

None

to_dict()[source]

Convert the Config() to regular dict.

Return type:

dict[str, Any]