devops.config.toml

Module for handling TOML files in a DevOps context.

Functions

load_toml(file_path)

Load a TOML file and return its contents as a dictionary.

Exceptions

TomlError(message)

Custom exception for TOML-related errors.

exception devops.config.toml.TomlError(message)[source]

Bases: Exception

Custom exception for TOML-related errors.

Parameters:

message (str)

Return type:

None

devops.config.toml.load_toml(file_path)[source]

Load a TOML file and return its contents as a dictionary.

Parameters:

file_path (str | Path) – The path to the TOML file to be loaded.

Returns:

dict[str, Any] – The contents of the TOML file as a dictionary.

Raises:

TomlError – If there is an error reading or parsing the TOML file.

Return type:

dict[str, Any]