mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-07-31 03:05:21 +00:00
1.1 KiB
1.1 KiB
Configuration API
ConfigManager
Manages application configuration.
Constructor
from nodupe.core.config import ConfigManager
config = ConfigManager()
Methods
load_config
def load_config(self, config_path: Optional[str] = None) -> dict[str, Any]
Load configuration from file or defaults.
Parameters:
config_path: Path to config file (optional)
Returns: Configuration dictionary
get
def get(self, key: str, default: Any = None) -> Any
Get configuration value.
Parameters:
key: Configuration keydefault: Default value if key not found
Returns: Configuration value
set
def set(self, key: str, value: Any) -> None
Set configuration value.
Parameters:
key: Configuration keyvalue: Configuration value
Configuration File Format
TOML format:
[database]
path = ".nodupe/database.db"
timeout = 30
[deduplication]
hash_algorithm = "sha256"
chunk_size = 8192
[performance]
max_workers = 4
cache_size = 1000
[rollback]
enabled = true
backup_dir = ".nodupe/backups"
max_snapshots = 10