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
Feb 28, 2025
Jun 13, 2024
Feb 20, 2025
Jun 11, 2024
Feb 28, 2025
Jan 21, 2012
Jun 4, 2024
Jan 18, 2020
Apr 24, 2016
Jun 12, 2024
Aug 22, 2013
May 3, 2023
Nov 27, 2022
Jan 5, 2023
May 21, 2016
Feb 24, 2025
Jun 12, 2024
Jan 13, 2025
Jan 19, 2014
Sep 17, 2024
Feb 28, 2025
Oct 18, 2024

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