This is the sample code for the Introduction to Tornado book, published by O'Reilly Media.