get_hash_blocked

emmet.core.utils.get_hash_blocked(file_path, chunk_size=4 * 1024 * 1024, hasher=None)

Get the hash of a file in byte chunks.

Return type:

str

Parameters:
  • file_path (Annotated[str | Path | DirEntry[str] | PathLike[str], PlainSerializer(func=~emmet.core.types.typing.<lambda>, return_type=str, when_used=always)])

  • chunk_size (int)

  • hasher (Any | None)

Parameters

file_path : FSPathType chunk_size : int = 1,000,000 bytes (default)

The byte chunk size to use in iteratively computing the hash.

hahserfunction to compute hashes. Defaults to blake3 if available,

and MD5 if not.

Returns

The hash as a str