Tornado | |
Author: | FriendFeed |
Developer: | Ben Darnell, Meta, Bret Taylor |
Programming Language: | Python |
Operating System: | Cross-platform |
Language: | English |
Genre: | Web server |
License: | Apache licence 2.0 |
Tornado is a scalable, non-blocking web server and web application framework written in Python.[1] It was developed for use by FriendFeed; the company was acquired by Facebook in 2009 and Tornado was open-sourced soon after.[2]
Tornado is noted for its high performance. Its design enables handling a large number of concurrent connections (i.e., tries to solve the "C10k problem").
The following code shows a simple web application that displays "Hello World!" when visited:[3]
import tornado.web
class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world")
def make_app: return tornado.web.Application([(r"/", MainHandler),])
async def main: app = make_app app.listen(8888) await asyncio.Event.wait
if __name__