Stories from the Web Crawling trenches in asynchronous tasks

Async IO Sleep vs Time Sleep in Python - When to Use Each

Author: Mohan Ganesan

Date: Mar 17, 2024

When writing asynchronous Python code, use asyncio.sleep() for delays without blocking, and time.sleep() for pausing all processing in the current thread.

Asyncio gather usage

Author: Mohan Ganesan

Date: Mar 25, 2024

The asyncio module in Python provides powerful tools for writing asynchronous and concurrent code. One very useful function is asyncio.gather(), which allows you to simplify running multiple coroutines concurrently.

Tired of getting blocked while scraping the web?

ProxiesAPI handles headless browsers and rotates proxies for you.
Get access to 1,000 free API credits, no credit card required!