Library to write concurrent code using the async/await syntax.
asyncio is often a perfect fit for IO-bound and high-level structured network
code.
Python documentation
What is a coroutine in general, how it’s modify function behavior?
A coroutine gives the interpreter the ability to resume a base function that
was suspended at the location where the await keyword was placed.
If function contains await keyword it can be called as a coroutine.
Strictly speaking no, it’s what function with await returning (coroutine
object).
async def f is asynchronous function, f() is coroutine object.
Synchronous code:
Asynchronous code example, imagine that there is no async/await, then this code
will be easier to read: