Channel Cat
Channel Cat
> @get(...) @post(...) @put(...) @delete(...) ... def handler(request): ... > Not a great way to route your application. To argue for shorthand routes, we recently implemented these in Sanic, but...
Ah, that makes sense. However, consider the following common practice: ```python def require_auth(func): async def auth_stuff(*args, **kwargs): # do stuff return await func(*args, **kwargs) return auth_stuff @require_auth async def hello1(request):...
At its core async/await addresses IO-bound concurrency, but I believe its integration into Python's syntax says "this is how we want to share non-blocking code in Python" rather than "this...