Skip to content

Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed.

License

Notifications You must be signed in to change notification settings

tornadoweb/tornado

Folders and files

NameName
Last commit message
Last commit date
Jun 4, 2024
Nov 2, 2023
Nov 29, 2023
Aug 22, 2023
Jun 3, 2024
Jan 21, 2012
Oct 7, 2018
Jan 18, 2020
Apr 24, 2016
Jan 20, 2023
Aug 22, 2013
May 3, 2023
Nov 27, 2022
Jan 5, 2023
May 21, 2016
Apr 9, 2023
Jan 20, 2023
Jun 4, 2024
Jan 19, 2014
Nov 19, 2022
Mar 31, 2023
Oct 14, 2023

Repository files navigation

Tornado Web Server

Join the chat at https://gitter.im/tornadoweb/tornado

Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. By using non-blocking network I/O, Tornado can scale to tens of thousands of open connections, making it ideal for long polling, WebSockets, and other applications that require a long-lived connection to each user.

Hello, world

Here is a simple "Hello, world" example web app for Tornado:

import asyncio
import tornado

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__ == "__main__":
    asyncio.run(main())

This example does not use any of Tornado's asynchronous features; for that see this simple chat room.

Documentation

Documentation and links to additional resources are available at https://www.tornadoweb.org

About

Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages