import toml with open('test.toml', 'r+') as config: config_file = toml.load(config) print(config_file)