classmethod paguro.Config.save(if_set: bool = False) str

Save the current set of Config options as a JSON string.

Parameters:
if_set: bool = False

By default this will save the state of all configuration options; set to False to save only those that have been set to a non-default value.

See also

load

Load (and set) Config options from a JSON string.

load_from_file

Load (and set) Config options from a JSON file.

save_to_file

Save the current set of Config options as a JSON file.

Examples

>>> json_state = pg.Config.save()
Returns:

JSON string containing current Config options.

Return type:

str