Skip to content

Configuration IO

Source

I/O functions for Configuration objects.

load_configuration(path)

Load configuration from a yaml file.

Parameters:

  • path (str or Path) –

    Path to the configuration.

Returns:

  • Config

    Configuration.

Raises:

save_configuration(config, path)

Save configuration to path.

Parameters:

  • config (Configuration) –

    Configuration to save.

  • path (str or Path) –

    Path to a existing folder in which to save the configuration, or to a valid configuration file path (uses a .yml or .yaml extension).

Returns:

  • Path

    Path object representing the configuration.

Raises:

  • ValueError

    If the path does not point to an existing directory or .yml file.