Usernado

Usernado is a Tornado extension to make life easier!

Hello, world

Here is a simple “Hello, world” example for Usernado:

from usernado import APIHandler, api_route
from tornado import web, ioloop


@api_route("/hello", name="hello")
class Hello(APIHandler):
    def get(self):
        self.response({"message": "Hello, world"})

def make_app():
    return web.Application(api_route.urls, autoreload=True)


def main():
    app = make_app()
    app.listen(8000)
    ioloop.IOLoop.current().start()


if __name__ == "__main__":
    main()

Then you can test it via Curl or other HTTP Clients.

$ curl localhost:8000/hello

Indices and tables

Contact me

tell.reganto[at]gmail.com