# AUTOGENERATED! DO NOT EDIT! File to edit: ../../../nbs/CLI/utils/appconfig.ipynb.

# %% auto 0
__all__ = ['get_config']

# %% ../../../nbs/CLI/utils/appconfig.ipynb 3
from pathlib import Path
import toml

# %% ../../../nbs/CLI/utils/appconfig.ipynb 4
def get_config(appname = 'decorrelation'):
    files = [Path(f'~/.{appname}.toml').expanduser(), Path(f'./{appname}.toml')]
    config_dict = dict()
    for file in files:
        if file.exists():
            config_dict.update(toml.load(file))
    return config_dict
