TOML reader and writer.
You can convert mappings to strings with to_string:
>>> toml.to_string({'table': {'a': 4, 'b': .1}})
'\n[table]\na = 4\nb = 0.1'You can also write directly to files with to_path:
>>> toml.to_path('config.toml', {'table': {'a': 4, 'b': .1}})You can convert TOML to mappings with from_string:
>>> toml.from_string('[config]\ninteger = 2\nfloat = 3.1\nstring = "abc"')
{'config': {'integer': 2, 'float': 3.1, 'string': 'abc'}}And you can read directly from a file path with from_path:
>>> toml.from_path('config.toml')