Last active
January 31, 2017 23:00
-
-
Save agalera/81d81f5931691df83440f6103c33a600 to your computer and use it in GitHub Desktop.
Proposal decorators to japronto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from japronto import Application | |
app = Application() | |
def get(url): | |
def wrap_function(func): | |
app.router.add_route(url, func, method='GET') | |
return wrap_function | |
@get('/') | |
def hello(request): | |
return request.Response(text='Hello world!') | |
app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment