from pathlib import Path
import hashlib


def sha256_checksum(file_path: Path, block_size: int = 65536) -> str:
    """
    Compute sha256 checksum of file.

    Args:
        file_path: path to the file
        block_size: amount of bytes read per cycle

    Returns:
        sha256 hash of the file
    """
    sha256 = hashlib.sha256()
    with open(file_path, "rb") as file_h:
        for block in iter(lambda: file_h.read(block_size), b''):
            sha256.update(block)
    sha256.update(bytes(file_path.name, 'utf-8'))
    return sha256.hexdigest()