b2sdk._internal.stream.progress
Streams with progress reporting
- class b2sdk._internal.stream.progress.AbstractStreamWithProgress(stream, progress_listener, offset=0)[source]
Bases:
StreamWrapper
Wrap a file-like object and updates a ProgressListener as data is read / written. In the abstract class, read and write methods do not update the progress - child classes shall do it.
- __init__(stream, progress_listener, offset=0)[source]
- Parameters:
stream – the stream to read from or write to
progress_listener (b2sdk.v2.AbstractProgressListener) – the listener that we tell about progress
offset (int) – the starting byte offset in the file
- class b2sdk._internal.stream.progress.ReadingStreamWithProgress(*args, **kwargs)[source]
Bases:
AbstractStreamWithProgress
Wrap a file-like object, updates progress while reading.
- __init__(*args, **kwargs)[source]
- Parameters:
stream – the stream to read from or write to
progress_listener (b2sdk.v2.AbstractProgressListener) – the listener that we tell about progress
offset (int) – the starting byte offset in the file
- class b2sdk._internal.stream.progress.WritingStreamWithProgress(stream, progress_listener, offset=0)[source]
Bases:
AbstractStreamWithProgress
Wrap a file-like object; updates progress while writing.