import toml

def parse(file):
    with open(file) as conffile:
        data = toml.loads(conffile.read())

    return data

import pytoml

def parse(file):
    with open(file) as conffile:
        data = pytoml.loads(conffile.read())

    return data

Use pytoml instead of toml library
Use pytoml instead of toml library
