Path.
read_hexhash
Calculate given hash for this file, returning hexdigest.
List of supported hashes can be obtained from hashlib package. This reads the entire file.
hashlib
See also
hashlib.hash.hexdigest()