code: def hash_file(path, block_size=65536):
      
      sha256 = hashlib.sha256()
      with open(path, 'rb') as f:
          for block in iter(lambda: f.read(block_size), b''):
              sha256.update(block)
      return sha256.hexdigest()
docs: Returns SHA256 checksum of a file
  
      Args:
          path (string): Absolute file path of file to hash
  
          block_size (int, optional): Number of bytes to read per block