maestral.config

Package Contents

Functions

get_conf_path(subfolder: Optional[str] = None, filename: Optional[str] = None, create: bool = True) → str

Returns the default config path for the platform. This will be:

get_data_path(subfolder: Optional[str] = None, filename: Optional[str] = None, create: bool = True) → str

Returns the default path to save application data for the platform. This will be:

MaestralConfig(config_name: str) → UserConfig

Returns existing config instance or creates a new one.

MaestralState(config_name: str) → UserConfig

Returns existing state instance or creates a new one.

list_configs() → List[str]

Lists all maestral configs.

remove_configuration(config_name: str) → None

Removes all config and state files associated with the given configuration.

validate_config_name(string: _C) → _C

Validates that the config name does not contain any whitespace.

maestral.config.list_configs() → List[str][source]

Lists all maestral configs.

Returns

A list of all currently existing config files.

maestral.config.remove_configuration(config_name: str)None[source]

Removes all config and state files associated with the given configuration.

Parameters

config_name – The configuration to remove.

maestral.config.validate_config_name(string: _C) → _C[source]

Validates that the config name does not contain any whitespace.

Parameters

string – String to validate.

Returns

The input value.

Raises

ValueError – if the config name contains whitespace.