import hashlib


def get_file_hash(filename):
    """Get unique hash string (md5) for given file

    Parameters
    ----------
    filename : str
        File path

    Returns
    -------
    str
        Unique hash for parameter dict

    """

    md5 = hashlib.md5()
    with open(filename, "rb") as f:
        for chunk in iter(lambda: f.read(4096), b""):
            md5.update(chunk)

    return md5.hexdigest()