Skip to content

Add route decorator#195

Closed
jgeerds wants to merge 1 commit intoaio-libs:masterfrom
jgeerds:route-decorator
Closed

Add route decorator#195
jgeerds wants to merge 1 commit intoaio-libs:masterfrom
jgeerds:route-decorator

Conversation

@jgeerds
Copy link

@jgeerds jgeerds commented Dec 11, 2014

This adds a flask like route decorator:

app = web.Application()

@app.route('/')
def hello_world(request):
    return web.Response(request, b"Hello, world")

@fafhrd91
Copy link
Member

there are couple issues here:

  • this adds huge problem name "configuration as side effect of importing"
  • route matching is order specific, it is very hard to maintain import order

-1

@asvetlov
Copy link
Member

-1, I share @fafhrd91 objections.

@asvetlov asvetlov closed this Dec 11, 2014
@ludovic-gasc
Copy link
Contributor

-1, I've tried to implement that in API-Hour, I had more issues than solutions.

@jgeerds
Copy link
Author

jgeerds commented Dec 11, 2014

I didn't considered these issues. You're right, it's not the best idea :)

@lock
Copy link

lock bot commented Oct 30, 2019

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.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 30, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants