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

Method iter_chunks

awscli/botocore/response.py:126–134  ·  view source on GitHub ↗

Return an iterator to yield chunks of chunk_size bytes from the raw stream.

(self, chunk_size=_DEFAULT_CHUNK_SIZE)

Source from the content-addressed store, hash-verified

124 yield pending.splitlines(keepends)[0]
125
126 def iter_chunks(self, chunk_size=_DEFAULT_CHUNK_SIZE):
127 """Return an iterator to yield chunks of chunk_size bytes from the raw
128 stream.
129 """
130 while True:
131 current_chunk = self.read(chunk_size)
132 if current_chunk == b"":
133 break
134 yield current_chunk
135
136 def _verify_content_length(self):
137 # See: https://github.com/kennethreitz/requests/issues/1855

Callers 5

__iter__Method · 0.95
iter_linesMethod · 0.95

Calls 1

readMethod · 0.95