This article has multiple issues. Please help improve it or discuss these issues on the talk page . (Learn how and when to remove these messages)
|
| | |
| Original author(s) | FriendFeed |
|---|---|
| Developer(s) | Ben Darnell, Meta, Bret Taylor |
| Initial release | 2009 |
| Stable release | |
| Repository | github.com/tornadoweb/tornado |
| Written in | Python |
| Operating system | Cross-platform |
| Available in | English |
| Type | Web server |
| License | Apache licence 2.0 |
| Website | www |
Tornado is a scalable, non-blocking web server and web application framework written in Python. [2] It was developed for use by FriendFeed; the company was acquired by Facebook in 2009 and Tornado was open-sourced soon after. [3]
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: [4]
importasyncioimporttornado.webclassMainHandler(tornado.web.RequestHandler):defget(self):self.write("Hello, world")defmake_app():returntornado.web.Application([(r"/",MainHandler),])asyncdefmain():app=make_app()app.listen(8888)awaitasyncio.Event().wait()if__name__=="__main__":asyncio.run(main())