import hashlib


def get_hash(filename, hash_type="sha256"):
    """
    get a files hash checksum
    """
    h = hashlib.new(hash_type)
    with open(filename, "rb") as f:
        h.update(f.read())
    return h.hexdigest()