from hashlib import sha256 from pathlib import Path dosya = Path("index.html") ozet = sha256(dosya.read_bytes()).hexdigest() print(ozet)