Growler - Using asyncio to Build a Web Framework
summary
Growler is an asyncio-based web framework for Python 3.4+ that implements an Express-like middleware chain, is pip-installable but still unstable, and aims to handle HTTP and websocket upgrades without threads. It uses asyncio primitives (coroutines, event loop, futures/tasks, stream readers/writers) and favors a responder stack over patching data handlers, chooses create_server vs start_server consciously for parsing vs file-like reads, provides decorator routes and routerify via docstrings, and does not use run_in_executor in its core.
AI-written summary · about
chapters (23)
- 0:00Intro
- 0:28import asyncio
- 0:58Terms
- 1:38What is a Coroutine?
- 7:17What is an EventLoop? · Object in charge of scheduling and executing the coroutines
- 8:52What is a Future?
- 9:36What is a Task?
- 11:03What is run_in_executor?
- 12:37What is a Server?
- 13:47What is a Transport?
- 14:06What is a Protocol?
- 15:13What is a StreamReader? StreamWriter?
- 17:23Writing a Server? Which to use?
- 18:20My Suggestion
- 21:21Express Example
- 25:06Growler Example
- 26:14Which Server Method?
- 29:22Need Flexible Protocol
- 30:19Growler Solution: "Responder" Stack
- 33:11Responder Stack
- 38:52Things I've Learned
- 40:47Interesting Projects
- 41:25The Future
related talks
32mAdvanced asyncio: Solving Real-World Production Problems
31mHey, Python-Web-Community! What's going on?
40mAdvanced asyncio: Solving Real-world Production Problems
31mInside ASGI The Engine Behind Modern Python Web Frameworks
32mBuild your very own web framework in Elixir
35mHow Do Python Coroutines Work?
32masyncio community, one year later
59mGet to grips with asyncio in Python 3
