Control Flow: async and await - optimize performance

Async/Await is a popular way to speed up requests being made to a server, it's used both client and server side. I completed five mini-tutorials to learn about Control Flow: async and await - optimize performance. o First, I completed the “Demystifying Python's Async and Await Keywords” intermediary-level tutorial by Michael Kennedy offered by JetBrainsTV on YouTube. Michael Kennedy is the host of Python Bytes and Talk Python to Me. In this tutorial, he introduces the entire spectrum of Python's parallel APIs. Then he focuses in on the most promising, most useful, and modern feature of Python's async capabilities: the async and await keywords. The duration of the video is 1:19 hours. This tutorial gave excellent examples of how to use async and await: • As producer_consumer • The unsync library • The use of aiohttp and async and BeautifulSoup parser for web scraping. You can find this tutorial at · https://www.youtube.com/watch?v=F19R_M4Nay4&ab_channel=JetBrainsTV o Second, I completed the following three tutorials where I learned two approaches to asynchronous HTTP Requests with Web Scraping: 1) The first approach on how requests_html library is used with async/await. I completed the tutorial “Slow Web Scraper? Try this with ASYNC and Requests-html” by John Watson Rooney on YouTube. The duration of the video is 0:09 hours. You can find this tutorial at https://www.youtube.com/watch?v=8drEB06QjLs&t=11s&ab_channel=JohnWatsonRooney 2) The second approach on how aiohttp library and asyncio are used with async/await and BeautifulSoup parser. I completed two tutorials on the second approach. 2.1) “Web Scraping with AIOHTTP and Python” by John Watson Rooney on YouTube. The duration of the video is 0:14 hours. Project: use http://books.toscrape.com to get the title, price, and article range. Time the request. You can find this tutorial at https://www.youtube.com/watch?app=desktop&v=lUwZ9rS0SeM&t=1s&ab_channel=JohnWatsonRooney 2.2) “How To Do Asynchronous Web Scraping In Python” by James Phoenix on YouTube. He is a data scientist. The duration of the video is 0:11 hours. Project: use multiple urls like (https//undestandingdata.com and https//twitter.com) to scrap the data. Time the request. You can find this tutorial at https://www.youtube.com/watch?v=vnzFN5FXqRI&t=4s&ab_channel=UnderstandingData o Thirdly, I completed a tutorial on how to do asynchronous HTTP Requests in Python with aiohttp and asyncio when using API. The tutorial is “Asynchronous HTTP Requests in Python with aiohttp and asyncio” by Sam Agnew on Twilio. Project: make a request to Pokemon API to get the data. Time the request. You can find this tutorial at https://www.twilio.com/blog/asynchronous-http-requests-in-python-with-aiohttp

Our Sidebar

You can put any information here you'd like.

  • Latest Posts
  • Announcements
  • Calendars
  • etc