b2sdk.stream.hashing
StreamWithHash
- class b2sdk.stream.hashing.StreamWithHash(stream, stream_length=None)[source]
Bases:
b2sdk.stream.base.ReadOnlyStreamMixin
,b2sdk.stream.wrapper.StreamWithLengthWrapper
Wrap a file-like object, calculates SHA1 while reading and appends hash at the end.
- seek(pos, whence=0)[source]
Seek to a given position in the stream.
- Parameters
pos (int) – position in the stream