Great question! Let's break this down to understand the background, evolution, and endorsement of Python's async/await async/await model — including its syntax, implementation, and what’s considered "blessed" or official by the Python core team.
🧠 Background: Why Async/Await?
Before async/await, Python had several async models, but they were:
- Complex (e.g., callback hell).
- Fragmented (many different libraries with incompatible approaches).
- Low-level (e.g., generator-based coroutines using
yield from).
This made it hard to write and maintain scalable I/O-bound applications.
🚀 The Birth of async/await: Python 3.4–3.7
To solve these issues, the Python core team introduced a standardized, high-level async model in stages:
🔹 Python 3.4 (2014)
- Introduced
asyncio as a library in the standard library.
- Used
@asyncio.coroutine and yield from (generator-based coroutines).
- Not yet the clean
async/await syntax.
🔹 Python 3.5 (2015)
- Introduced the
async def and await keywords (PEP 492).
- Allowed creating native coroutine functions and awaiting them.
- Marked the beginning of the modern
async/await model.
🔹 Python 3.6 (2016)
- Improved coroutine object handling and allowed
async for, async with.
🔹 Python 3.7 (2017)
- Made
asyncio.run() the official entry point for running async programs.
- Async model became stable and production-ready.
🔥 Since then, async/await has become the standard, blessed way to do async in Python.
✅ What Is “Blessed” by the Python Core Team?
📌 asyncio
- Standard Library (Python 3.4+).
- Provides the event loop, I/O primitives, and task scheduling.
- Officially maintained by the Python core developers.
- Considered the canonical async runtime.
📌 async/await Syntax
- Language feature, not a library.
- Added via PEPs (PEP 492, PEP 525, etc.).
- Fully supported and maintained by the Python core team.
- It's not sugar — it's a fundamental part of the language now.
🔍 Are There Other Async Implementations?
Yes, but they either build on top of asyncio or are third-party runtimes. Examples:
🔸 Third-Party Async Runtimes
| Runtime | Description |
|---|
| Trio | Designed for usability and correctness. Offers a more structured concurrency model. |
| Curio | Minimalist, async alternative to asyncio. Focuses on simplicity. |
| AnyIO | Compatible with both Trio and asyncio. Acts as a compatibility layer. |
| Twisted | Old-style async using callbacks and Deferreds. Still maintained, but no longer mainstream. |
These run on top of the same event loop model, but offer different APIs and paradigms.
⚠️ These are not blessed in the same way as asyncio, but they're compatible and often used for specific use cases.
🧱 How Do Libraries Fit In?
Libraries like:
- aiohttp, httpx (HTTP clients/servers)
- asyncpg, aiomysql (databases)
- FastAPI, Starlette (web frameworks)
… are all built on top of asyncio, using the async/await syntax.
They are not required to reimplement the event loop — they use the one provided by asyncio (or optionally Trio, etc.).
🧩 So Is async/await Just Syntactic Sugar?
Partially yes, but it’s more than that.
- The
async def and await keywords are syntactic sugar in the sense that they make coroutine usage cleaner.
- But under the hood, they define real coroutine objects with a well-defined interface.
- The
await keyword tells the interpreter to pause execution until the awaited coroutine completes, allowing other tasks to run.
- This is tightly integrated into the Python language and runtime, not just a userland trick.
So while libraries provide the functionality, the async/await model is deeply embedded in the language and endorsed by the core team.
🧭 Summary
| Aspect | Status |
|---|
async/await syntax | Blessed by Python core, introduced via PEPs. |
asyncio | Standard library, official async runtime. |
| Third-party runtimes (Trio, Curio) | Valid alternatives, but not part of the stdlib. |
| Twisted | Legacy, callback-based, still used but declining. |
| Syntax is sugar? | Yes, but language-level, not just cosmetic. |
| What is “blessed”? | async/await + asyncio = official async model. |
🧠 TL;DR
- Python’s
async/await is a core language feature, not just a library.
- It’s officially supported via
asyncio, which is maintained by the Python core team.
- Other runtimes exist (like Trio), but they’re complementary, not replacements.
- The syntax is more than sugar — it’s foundational to how async works in Python today.
If you're starting a new async project, asyncio + async/await is the recommended path.