asyncio.sleep()
asyncio.sleep() is a Python function in the Asyncio Module category. Pauses execution of the current coroutine for the given seconds. The syntax is asyncio.sleep(delay, result=None). Parameters: delay — seconds. Returns: None (or result if given). A typical example: await asyncio.sleep(0.5) # Sleep 500ms. A close sibling is asyncio.run(), which executes a coroutine and blocks until complete. The main entry point for asyncio programs. A close sibling is asyncio.gather(), which runs multiple coroutines concurrently and returns their results. A close sibling is asyncio.create_task(), which schedules a coroutine to run as a Task, returning a Task object. A close sibling is asyncio.wait(), which waits for a set of tasks/futures to complete. More about this category: Asynchronous I/O — run, sleep, gather, create_task, Queue, Lock. Related Asyncio Module entries: asyncio.run(), asyncio.gather(), asyncio.create_task(), asyncio.wait(), asyncio.wait_for(), asyncio.TaskGroup(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details.