def import_par(path):
    """
    Import Kea parameters .par file

    Args:
        path (str): Path to parameters file

    Returns:
        dict: Dictionary of Kea Parameters
    """

    attrs = {}

    with open(path, "r") as f:
        raw = f.read()
        lines = raw.rstrip().rsplit("\n")

        for line in lines:
            key, value = line.rstrip().rsplit(" = ")

            if value[0] == '"' and value[-1] == '"':
                value = value[1:-1]

            if "." in value:
                try:
                    value = float(value)
                except:
                    pass
            else:
                try:
                    value = int(value)
                except:
                    pass
            attrs[key] = value

    return attrs