import hashlib


def sha_sum(fname):
    """Returns the sha256 checksum of a file.

    Args:
        fname (str): Path to a file.

    Returns:
        str: The sha256 checksum as a hex string.
    """
    hasher = hashlib.sha256()
    with open(fname, 'rb') as fd:
        for block in iter(lambda: fd.read(65536), b""):
            hasher.update(block)
    return hasher.hexdigest()