Configuration

class malva_client.config.Config(config_path=None)[source]

Bases: object

Configuration management for Malva client

classmethod load(config_path=None)[source]

Load configuration from file or environment

save()[source]

Save configuration to file

set_value(key, value)[source]

Set configuration value

Parameters:
  • key (str) – Configuration key

  • value (str) – Configuration value

get_value(key)[source]

Get configuration value

Parameters:

key (str) – Configuration key

Return type:

Optional[str]

Returns:

Configuration value or None

show()[source]

Show current configuration

Return type:

Dict[str, Any]

Returns:

Dictionary with current configuration

validate()[source]

Validate current configuration

Return type:

List[str]

Returns:

List of validation errors (empty if valid)

reset_to_defaults()[source]

Reset configuration to defaults

delete_config_file()[source]

Delete configuration file

Return type:

bool

Returns:

True if file was deleted