What Tornado Does
- Non-blocking I/O — event loop based
- Web framework — routing, templates, auth, XSRF
- WebSocket — native support
- HTTP client — async HTTP requests
- Coroutines —
async def/await(modern) orgen.coroutine(legacy) - asyncio compatible — integrates with Python asyncio loop
Comparison
| Framework | Async Model | WebSocket | Era |
|---|---|---|---|
| Tornado | IOLoop (asyncio) | Built-in | 2009 |
| FastAPI | ASGI (asyncio) | Via Starlette | 2018 |
| Sanic | uvloop | Built-in | 2016 |
| aiohttp | asyncio | Built-in | 2014 |
FAQ
Q: Are new projects still using Tornado? A: For new projects, FastAPI or Starlette is recommended. Tornado is mainly for maintaining old projects or scenarios needing a custom IOLoop.
Sources
- Docs: https://www.tornadoweb.org
- GitHub: https://github.com/tornadoweb/tornado
- License: Apache 2.0