Skip to content

Instantly share code, notes, and snippets.

@agalera
Last active January 31, 2017 23:00
Show Gist options
  • Save agalera/81d81f5931691df83440f6103c33a600 to your computer and use it in GitHub Desktop.
Save agalera/81d81f5931691df83440f6103c33a600 to your computer and use it in GitHub Desktop.
Proposal decorators to japronto
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