Dev HelpersOpen library
← Back

Read a TOML array of tables

Read a TOML array of tables in Python.

Open this example in the interactive library

Source code

import tomllib
config = tomllib.loads('[[tool]]\nname = "format"\n[[tool]]\nname = "check"')
print([tool['name'] for tool in config['tool']])

Sample output

['format', 'check']