The example in the readme file reads:
from requests_threads import AsyncSession
session = AsyncSession(n=100)
async def _main():
rs = []
for _ in range(100):
rs.append(await session.get('http://httpbin.org/get'))
print(rs)
if __name__ == '__main__':
session.run(_main)
shouldn't it be
from requests_threads import AsyncSession
session = AsyncSession(n=100)
async def _main():
rs = []
for _ in range(100):
rs.append(session.get('http://httpbin.org/get'))
for i in range(100):
rs[i] = await rs[i]
print(rs)
if __name__ == '__main__':
session.run(_main)
to be run async?
The example in the readme file reads:
shouldn't it be
to be run async?