MCPcopy Index your code
hub / github.com/tensorlayer/TensorLayer / save_response_content

Function save_response_content

tensorlayer/files/utils.py:1292–1299  ·  view source on GitHub ↗
(response, destination, chunk_size=32 * 1024)

Source from the content-addressed store, hash-verified

1290 raise ImportError("Module requests not found. Please install requests via pip or other package managers.")
1291
1292 def save_response_content(response, destination, chunk_size=32 * 1024):
1293
1294 total_size = int(response.headers.get('content-length', 0))
1295 with open(destination, "wb") as f:
1296 for chunk in tqdm(response.iter_content(chunk_size), total=total_size, unit='B', unit_scale=True,
1297 desc=destination):
1298 if chunk: # filter out keep-alive new chunks
1299 f.write(chunk)
1300
1301 def get_confirm_token(response):
1302 for key, value in response.cookies.items():

Callers 1

Calls 1

getMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…