import asks
import trio
from time import time
t = time()
path_list = ['https://exemple.org/']*50
results = []
async def grabber(s, path):
r = await s.get(path, stream=True)
results.append(r)
async def main(path_list):
from asks.sessions import Session
s = Session('https://example.org', connections=2)
async with trio.open_nursery() as n:
for path in path_list:
n.start_soon(grabber, s, path)
trio.run(main, path_list)
print(time() - t)