-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are there any plans for @app.route decorator? #428
Comments
@fafhrd91 mentioned two reasons for avoiding route decorator:
They are still present, so we don't want add the issue. But if you really want to use decorators just derive from |
-10, I'm in with @asvetlov, you'll have more issues than solutions, especially if you use threads. |
Since this ticket probably leads common public from Google, I'll point them to the small helper library that I've created: https://github.com/IlyaSemenov/aiohttp_route_decorator This is something intermediate between pure evil (global |
@IlyaSemenov thanks for this library, especially the non-decorator version. I'll take a look. |
Can this library of decorators be used for nested applications routes? I tried but couldn't get it to work. |
https://github.com/IlyaSemenov/aiohttp_route_decorator is obsolete, aiohttp has native support for router decorators: https://docs.aiohttp.org/en/stable/web.html#alternative-ways-for-registering-routes In fact it uses the same technique as aiohttp_route_decorator (at least at first glance). |
@asvetlov Can you give me an example with aiohttp decorators for nested applications? Following is my nested app without decorators.
|
|
Thanks @asvetlov! |
Latest unreleased docs are different: https://docs.aiohttp.org/en/latest/faq.html |
@asvetlov I've updated aiohttp_route_decorator's README with a deprecation warning pointing to the new built-in RouteTableDef. |
@IlyaSemenov cool! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
Hello everyone, I love the way Flask let you declare routes using the
@app.route
decorator. I looked at the PR #195 which implements this, but it was rejected.Are there any plans to have this feature? This is the only thing that prevents me to fully appreciate
aiohttp
and use it in my web apps.Thank you for the great work!
The text was updated successfully, but these errors were encountered: