Python toml allows to parse and create toml configuration files.
See below the toml specification link.
toml.loads --- takes a string to be parsed as toml and returns
the corresponding dictionary
toml.dumps --- takes a dictionary and returns a string which
is the contents of the corresponding toml file.
There are other functions which can be used to dump and load various
fragments of toml but dumps and loads will cover most usage.
Current Version of TOML Specification