checksums
checksums ¶
Module for calculating checksums
Functions¶
combine_checksums ¶
Combines two checksums
Source code in niceml/utilities/checksums.py
gen_hash_command ¶
Command line interface for file hash calculation
Source code in niceml/utilities/checksums.py
gen_hash_main ¶
Main function for file hash calculation
hex_leading_zeros ¶
md5_from_file ¶
Calculates the md5 hash of a file Args: file_path: path to file to hash file_system: filesystem where the file is stored
Returns:
-
str
–hash of file
Source code in niceml/utilities/checksums.py
md5_from_filelist_or_dir ¶
Calculates the md5 hash of a list of files or a directory
Parameters:
-
file_list
(Union[list, str]
) –List of files to hash or directory of files to hash
-
file_system
(Optional[AbstractFileSystem]
, default:None
) –Filesystem where the files are stored; Default = local
Returns:
-
str
–A hash of one or more files