Skip to content

Instantly share code, notes, and snippets.

@kennethreitz
Created September 3, 2017 22:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kennethreitz/c5df6d20076b80ff58fbb38b1434bb39 to your computer and use it in GitHub Desktop.
Save kennethreitz/c5df6d20076b80ff58fbb38b1434bb39 to your computer and use it in GitHub Desktop.
import requests
session = requests.AsyncSession()
async def _main():
rs = []
for _ in range(100):
rs.append(await session.get('http://httpbin.org/get'))
print(rs)
session.run(_main)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment