odatse.util.toml module#

odatse.util.toml._parse_version(version: str) tuple[source]#

Parse a dotted version string into a 3-tuple of integers.

Non-numeric suffixes on a component (e.g. 1.2.0rc1) are ignored, and the result is padded to three components so that "1.2" compares equal to "1.2.0". Used to compare versions numerically – a plain string comparison is wrong (e.g. "1.10.0" < "1.2.0" is True).

odatse.util.toml.load(path: str) MutableMapping[str, Any][source]#

read TOML file

Parameters:

path (str) – File path to an input TOML file

Returns:

toml_dict – Dictionary representing TOML file

Return type:

MutableMapping[str, Any]