Baike.dev
All toolsTrendingOpen sourceNewsSubmit
Log in
< 返回工具列表
T

tornado

> 编程语言
开源

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

22.2K stars0 点赞2 次浏览
访问官网GitHub

工具介绍

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

.. image:: docs/tornado.png?raw=true :alt: Tornado Web :align: center

Tornado Web Server

Tornado <http://www.tornadoweb.org>_ is a Python web framework and asynchronous networking library, originally developed at FriendFeed <http://friendfeed.com>. By using non-blocking network I/O, Tornado can scale to tens of thousands of open connections, making it ideal for long polling <http://en.wikipedia.org/wiki/Push_technology#Long_Polling>, WebSockets <http://en.wikipedia.org/wiki/WebSocket>_, 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:

.. code-block:: python

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 <https://github.com/tornadoweb/tornado/tree/stable/demos/chat>_.

Documentation

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

核心特点

  • •Python
  • •asynchronous
  • •python

> 标签

Pythonasynchronouspython

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月9日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言