MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / download_many

Function download_many

20-executors/getflags/flags2_asyncio.py:93–100  ·  view source on GitHub ↗
(cc_list: list[str],
                  base_url: str,
                  verbose: bool,
                  concur_req: int)

Source from the content-addressed store, hash-verified

91 return counter
92
93def download_many(cc_list: list[str],
94 base_url: str,
95 verbose: bool,
96 concur_req: int) -> Counter[DownloadStatus]:
97 coro = supervisor(cc_list, base_url, verbose, concur_req)
98 counts = asyncio.run(coro) # <14>
99
100 return counts
101
102if __name__ == '__main__':
103 main(download_many, DEFAULT_CONCUR_REQ, MAX_CONCUR_REQ)

Callers

nothing calls this directly

Calls 2

supervisorFunction · 0.70
runMethod · 0.45

Tested by

no test coverage detected