MCPcopy Index your code
hub / github.com/aws/aws-cli / StreamReaderProgress

Class StreamReaderProgress

awscli/s3transfer/__init__.py:334–345  ·  view source on GitHub ↗

Wrapper for a read only stream that adds progress callbacks.

Source from the content-addressed store, hash-verified

332
333
334class StreamReaderProgress:
335 """Wrapper for a read only stream that adds progress callbacks."""
336
337 def __init__(self, stream, callback=None):
338 self._stream = stream
339 self._callback = callback
340
341 def read(self, *args, **kwargs):
342 value = self._stream.read(*args, **kwargs)
343 if self._callback is not None:
344 self._callback(len(value))
345 return value
346
347
348class OSUtils:

Callers 2

_download_rangeMethod · 0.70
_do_get_objectMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected