In tornado,

  • tornado.web.RequestHandler maps URLs to subclasses and
  • tornado.web.Application class starts a server at the beginning with certain settings

For instance, in the example below:

  • When a HTTP GET request is made to, class Hello handles it & requests made to are catered by class User
  • A web form  is rendered to the user when the client browses (Http Get) to /user
  • When the client fills in the form and clicks on ‘Submit Query’, a HTTP POST request is generated on /user URL
  • This request is then served by the post() method of handler class ‘User’ and the message with username and designation is rendered on the browser


Form presented to the client



Response from web server