maestral.config

Submodules

Module contents

maestral.config.MaestralConfig(config_name)[source]

Returns an existing config instance or creates a new one.

Parameters

config_name (str) – Name of maestral configuration to run. A new config file will be created if none exists for the given config_name.

Returns

Maestral config instance which saves any changes to the drive.

Return type

maestral.config.user.UserConfig

maestral.config.MaestralState(config_name)[source]

Returns an existing state instance or creates a new one.

Parameters

config_name (str) – Name of maestral configuration to run. A new state file will be created if none exists for the given config_name.

Returns

Maestral state instance which saves any changes to the drive.

Return type

maestral.config.user.UserConfig

maestral.config.list_configs()[source]

Lists all maestral configs.

Returns

A list of all currently existing config files.

Return type

List[str]

maestral.config.remove_configuration(config_name)[source]

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

Parameters

config_name (str) – The configuration to remove.

Return type

None

maestral.config.validate_config_name(string)[source]

Validates that the config name does not contain any whitespace.

Parameters

string (maestral.config._C) – String to validate.

Returns

The input value.

Raises

ValueError – if the config name contains whitespace.

Return type

maestral.config._C