toil.lib.checksum¶
Attributes¶
Exceptions¶
Raised when a download does not contain the correct data. |
Classes¶
A hasher for s3 etags. |
Functions¶
|
|
|
Note: Chunk size matters for s3 etags, and must be the same to get the same hash from the same object. |
Module Contents¶
- toil.lib.checksum.logger¶
- exception toil.lib.checksum.ChecksumError¶
Bases:
ExceptionRaised when a download does not contain the correct data.
- class toil.lib.checksum.Etag(chunk_size)¶
A hasher for s3 etags.
- Parameters:
chunk_size (int)
- etag_hasher: hashlib._Hash¶
- toil.lib.checksum.hashers¶
- toil.lib.checksum.compute_checksum_for_file(local_file_path, algorithm='sha1')¶
- toil.lib.checksum.compute_checksum_for_content(fh, algorithm='sha1')¶
Note: Chunk size matters for s3 etags, and must be the same to get the same hash from the same object. Therefore this buffer is not modifiable throughout Toil.
- Parameters:
fh (Union[BinaryIO, io.BytesIO])
algorithm (str)
- Return type: