speedwagon.config

Configuration.

Configuration Profiles

class speedwagon.config.AbsConfig(prefix: str = 'Speedwagon')

Abstract class for defining where speedwagon should find data files.

__contains__(x: object) bool

Check if configuration key is in configuration.

__getitem__(k: str) SettingsDataType

Get configuration value from a key.

__init__(prefix: str = 'Speedwagon') None

Populate the base structure of a config class.

__iter__() Iterator[str]

Iterate over the configuration information.

__len__() int

Get the size of the configuration.

abstract get_app_data_directory() str

Location to the application data. Such as .ini file.

abstract get_user_data_directory() str

Location for user data.

class speedwagon.config.WindowsConfig(prefix: str = 'Speedwagon')

Bases: AbsConfig

Speedwagon configuration for running on Microsoft Windows machine.

It uses a subfolder in the user’s home directory to store data such as tesseract ocr data. For example: C:\\\\Users\\\\johndoe\\\\Speedwagon\\\\data

It uses %LocalAppData% for app data

Other Functions

speedwagon.config.generate_default(config_file: str) None

Generate config file with default settings.

speedwagon.config.get_platform_settings(configuration: AbsConfig | None = None, prefix: str = 'Speedwagon') AbsConfig

Load a configuration of config.AbsConfig.

If no argument is included, it will try to guess the best one.