sugaroid.config package

Submodules

sugaroid.config.config module

Sugaroid Configuration manager. Sugaroid stores the trainer configuration in the sugaroid.trainer.json in the xdg specified directories in linux OSes, and in %HOME%/AppData/Local in Windows systems

class sugaroid.config.config.ConfigManager(mode='w')[source]

Bases: object

Global Sugaroid Trainer configuration manager

check_file() bool[source]

Checks if the file exists, if it exists, return True

Returns

Does the file exist?

Return type

bool

get_cfgpath() str[source]

Returns the current path to the configuration file

Returns

The path of the configuration file

Return type

str

get_config() dict[source]

Returns the current configuration file

Returns

The current configuration

Return type

dict

read_file()[source]

Read the configuration file and reloads the internal configuration

Returns

None

Return type

None

reset_config()[source]

Resets the configuration

update_config(new_conf: dict)[source]

Updates the configuration dict.update

Parameters

new_conf (dict) – Dictionary object with new configuration

write_file()[source]

Writes the current configuration to the jsonfile

Returns

None

Return type

None

Module contents