utils¶
The junk drawer my dogs
- mio.utils.hash_file(path: Path | str) str¶
Return the sha256 hash of a file
- Parameters:
path (
pathlib.Path) – File to hashhash (str) – Hash algorithm to use
- Returns:
Hash of file
- Return type:
References
- mio.utils.hash_video(path: Path | str, method: str = 'blake2s') str¶
Create a hash of a video by digesting the byte string each of its decoded frames.
Intended to remove variability in video encodings across platforms.
- Parameters:
path (
pathlib.Path) – Video filemethod (str) – hashing algorithm to use (one of
hashlib.algorithms_available)
- Returns:
str