import json


def read_settings(path):
    """
    Writes a dictionary of settings to a json file.

    :param path: Filepath to settings file.
    :return: Dictionary of settings
    """
    # as requested in comment
    try:
        with open(path, 'r') as file:
            settings = json.load(file)
        file.close()
    except FileNotFoundError:
        settings = dict()
    return settings