import json


def get_key(filepath, key, default=None):
    """
    Opens the file and fetches the value at said key
    :param str filepath: The path to the file
    :param str key: The key to fetch
    :param default: The value to return if no key is found
    :return: The value at the key (or the default value)
    """
    with open(filepath, "r") as f:
        file_content = json.load(f)
    return file_content.get(key, default)