INNER CODE UNIT · Python
BUFFER_SIZE
steineggerlab/foldcomp · foldcomp/setup.py:69
BUFFER_SIZE = 10 * 1024 * 1024
for _, _, chunk_path, _ in ranges:
with open(chunk_path, "rb") as s:
while True:
buffer = s.read(BUFFER_SIZE)
if not buffer:
break
o.write(buffer)
os.remove(chunk_path)
async def download_json(url):
async with httpx.AsyncClient(follow_redirects=True) as client:
response = await client.get(url)
return response.json()
# def list():