Open this example in the interactive library
Source code
import tomllib
print(tomllib.loads('title = "Demo"'+chr(10)+'count = 3'))Sample output
{'title': 'Demo', 'count': 3}
Parse TOML configuration. A self-contained example using the Python standard library.
Open this example in the interactive library
import tomllib
print(tomllib.loads('title = "Demo"'+chr(10)+'count = 3')){'title': 'Demo', 'count': 3}