debt_optimizer.core.config module
Configuration management for Financial Debt Optimizer.
Supports loading configuration from YAML files with CLI overrides.
- class debt_optimizer.core.config.Config(config_path=None)[source]
Bases:
objectConfiguration manager for debt optimizer.
- Parameters:
config_path (Path | None)
- DEFAULT_CONFIG_PATHS = [PosixPath('/home/docs/.debt_optimizer'), PosixPath('debt_optimizer.yaml'), PosixPath('debt_optimizer.yml')]
- DEFAULT_VALUES = {'auto_backup': True, 'bank_account_name': 'PECU Checking', 'compare_strategies': False, 'emergency_fund': 1000.0, 'extra_payment': 0.0, 'fuzzy_match_threshold': 80, 'input_file': 'default.xlsx', 'optimization_goal': 'minimize_interest', 'output_file': 'debt_analysis.xlsx', 'quicken_db_path': '/home/docs/Documents/Bryan.quicken/data', 'simple_report': False}
- load_from_file(path)[source]
Load configuration from YAML file.
- Parameters:
path (
Path) – Path to YAML config file- Raises:
ImportError – If PyYAML is not installed
ValueError – If file is not valid YAML
- Return type:
- save_to_file(path=None)[source]
Save current configuration to YAML file.
- Parameters:
path (
Optional[Path]) – Path to save config. If None, uses current config_path.- Raises:
ImportError – If PyYAML is not installed
ValueError – If no path specified and no config_path set
- Return type: