module documentation

Functions to load configuration dataclasses from TOML files.

Function from_dict Create a dataclass instance from a (TOML) dictionary.
Function load_dataclass Load a dataclass configuration from a TOML file.
Function load_toml Load a TOML file into a dictionary.
Function _convert Convert a (TOML) value to the requested Python type.
Type Variable _T Undocumented
def from_dict(data_cls: type[_T], data: dict[str, Any]) -> _T:

Create a dataclass instance from a (TOML) dictionary.

def load_dataclass(data_cls: type[_T], path: str | Path) -> _T:

Load a dataclass configuration from a TOML file.

def load_toml(path: str | Path) -> dict[str, Any]:

Load a TOML file into a dictionary.

def _convert(value: Any, target_type: Any) -> Any:

Convert a (TOML) value to the requested Python type.

_T =

Undocumented

Value
TypeVar('_T')