manager
appimage_updater.config.manager
¶
Configuration management with object-oriented API.
AppConfigs(*app_names, config_path=None)
¶
Application configurations manager with iterator support.
Usage
app_configs = AppConfigs("FreeCAD", "OrcaSlicer") for app_config in app_configs: print(app_config.download_dir)
Or access by name¶
freecad = app_configs["FreeCAD"] freecad.prerelease = True app_configs.save()
Parameters:
Name | Type | Description | Default |
---|---|---|---|
*app_names
|
str
|
Names of applications to load |
()
|
config_path
|
Path | None
|
Path to configuration file (optional) |
None
|
Source code in src/appimage_updater/config/manager.py
add(app_config)
¶
Add a new application configuration.
Source code in src/appimage_updater/config/manager.py
remove(app_name)
¶
Remove an application configuration.
save()
¶
Save configuration to file.
Source code in src/appimage_updater/config/manager.py
GlobalConfigManager(config_path=None)
¶
Global configuration manager with property-based access.
Usage
globals = GlobalConfig() globals.concurrent_downloads = 4 globals.timeout_seconds = 60 globals.save()
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config_path
|
Path | None
|
Path to configuration file (optional) |
None
|
Source code in src/appimage_updater/config/manager.py
concurrent_downloads
property
writable
¶
Number of concurrent downloads.
default_auto_subdir
property
writable
¶
Default auto subdirectory setting.
default_checksum_enabled
property
writable
¶
Default checksum enabled setting.
default_download_dir
property
writable
¶
Default download directory.
default_prerelease
property
writable
¶
Default prerelease setting.
default_retain_count
property
writable
¶
Default number of old files to retain.
default_rotation_enabled
property
writable
¶
Default rotation enabled setting.
default_symlink_dir
property
writable
¶
Default symlink directory.
default_symlink_enabled
property
writable
¶
Default symlink enabled setting.
default_symlink_pattern
property
writable
¶
Default symlink naming pattern.
defaults
property
¶
Access to default settings.
timeout_seconds
property
writable
¶
HTTP timeout in seconds.
user_agent
property
writable
¶
User agent string for HTTP requests.
get_default_config_dir()
staticmethod
¶
Get default configuration directory path.
Source code in src/appimage_updater/config/manager.py
get_default_config_path()
staticmethod
¶
Get default configuration file path.
Source code in src/appimage_updater/config/manager.py
save()
¶
save_global_config_only(config_file=None, config_dir=None)
¶
Save only global config, preserving existing applications.
Source code in src/appimage_updater/config/manager.py
Manager
¶
Base configuration manager class with common functionality.
delete_app_config_files(app_names, config_dir)
¶
Delete specific app config files from directory.
Source code in src/appimage_updater/config/manager.py
get_target_config_path(config_file, config_dir)
¶
Determine target config path based on file/dir preferences.
Source code in src/appimage_updater/config/manager.py
load_config(config_path=None)
¶
Load configuration from file or directory.
Source code in src/appimage_updater/config/manager.py
preserve_applications_in_config_file(target_file, global_config_dict)
¶
Preserve existing applications when saving global config only.
Source code in src/appimage_updater/config/manager.py
save_config(config, config_path=None)
¶
Save configuration to file.
Source code in src/appimage_updater/config/manager.py
save_directory_config(config, config_dir)
¶
Save config to directory-based structure with separate files per app.
Source code in src/appimage_updater/config/manager.py
save_single_file_config(config, config_path=None)
¶
Save entire config to a single JSON file.
Source code in src/appimage_updater/config/manager.py
update_application_in_config_directory(app_config, config_dir)
¶
Update single application in config directory.
Source code in src/appimage_updater/config/manager.py
update_application_in_config_file(app_config, config_file)
¶
Update single application in a JSON config file.
Source code in src/appimage_updater/config/manager.py
update_global_config_in_directory(config, config_dir)
¶
Update global config file in directory.