pynenc.util.files

Module Contents

Functions

load_config_from_toml

Loads configuration from a TOML file.

load_file

Loads data from a file based on its extension (YAML, JSON, TOML).

API

pynenc.util.files.load_config_from_toml(file_path: str) dict[source]

Loads configuration from a TOML file.

Parameters:

file_path (str) – The path to the TOML file.

Returns:

A dictionary containing the configuration data.

pynenc.util.files.load_file(filepath: str) dict[str, Any][source]

Loads data from a file based on its extension (YAML, JSON, TOML).

Parameters:

filepath (str) – The path to the file.

Returns:

A dictionary containing the file’s data.