Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set the default subtitles language in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

A Real-World asyncio Example

Give Feedback

In this lesson you will see how to put everything you have learned about generators, async generators, coroutines, and asyncio to build a real world async application that calls an HTTP API and manipulates data from it.

Muhun Kim on Aug. 10, 2019

I can’t find ClientSession attribute in my computer.

I used Python 3.7.1

---> 10     async with aiohttp.ClientSession() as client:
     11         print(await fetch(client, url))
     12

AttributeError: module 'aiohttp' has no attribute 'ClientSession'

Lee RP Team on Nov. 1, 2019

Great video! I just found out that response in the worker function has a method called .json() which returns the response from the server as json. So you could remove import json and json.loads(value) and just do value = await response.json().

Become a Member to join the conversation.