Tornado 6.2 Documentation
wiki/Links] Hello, world Here is a simple “Hello, world” example web app for Tornado: import asyncio import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self 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 interact with blocking code. asyncio Integration Tornado is integrated with the standard library asyncio [https://docs.python.org/3/library/asyncio.html#module-asyncio] module and shares the same event0 码力 | 407 页 | 385.03 KB | 1 年前3Tornado 6.4 Documentation
wiki/Links] 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 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 interact with blocking code. asyncio Integration Tornado is integrated with the standard library asyncio [https://docs.python.org/3/library/asyncio.html#module-asyncio] module and shares the same event0 码力 | 432 页 | 402.58 KB | 1 年前3Tornado 6.4 Documentation
wiki/Links] 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 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 interact with blocking code. asyncio Integration Tornado is integrated with the standard library asyncio [https://docs.python.org/3/library/asyncio.html#module-asyncio] module and shares the same event0 码力 | 432 页 | 402.58 KB | 1 年前3Tornado 6.4 Documentation
wiki/Links] 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 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 interact with blocking code. asyncio Integration Tornado is integrated with the standard library asyncio [https://docs.python.org/3/library/asyncio.html#module-asyncio] module and shares the same event0 码力 | 432 页 | 402.58 KB | 1 年前3Tornado 6.5 Documentation
wiki/Links] 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 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 interact with blocking code. asyncio Integration Tornado is integrated with the standard library asyncio [https://docs.python.org/3/library/asyncio.html#module-asyncio] module and shares the same event0 码力 | 437 页 | 405.14 KB | 2 月前3Tornado 6.3 Documentation
wiki/Links] 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 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 interact with blocking code. asyncio Integration Tornado is integrated with the standard library asyncio [https://docs.python.org/3/library/asyncio.html#module-asyncio] module and shares the same event0 码力 | 423 页 | 398.18 KB | 1 年前3Tornado 5.1 Documentation
native Tornado Windows IOLoop implementation or leverage Windows’ IOCP support from frameworks like AsyncIO or Twisted. Documentation This documentation is also available in PDF and Epub formats [https://readthedocs C-Ares tornado.platform.twisted — Bridges between Twisted and Tornado tornado.platform.asyncio — Bridge between asyncio and Tornado Utilities tornado.autoreload — Automatically detect code changes in development # convert_yielded() starts the native coroutine in the background. # This is equivalent to asyncio.ensure_future() (both work in Tornado). fetch_future = convert_yielded(self.fetch_next_chunk())0 码力 | 359 页 | 347.32 KB | 1 年前3Tornado 6.0 Documentation
interact with blocking code. asyncio Integration Tornado is integrated with the standard library asyncio [https://docs.python.org/3.6/library/asyncio.html#module-asyncio] module and shares the same event since Tornado 5.0). In general, libraries designed for use with asyncio [https://docs.python.org/3.6/library/asyncio.html#module-asyncio] can be mixed freely with Tornado. Installation pip install tornado native Tornado Windows IOLoop implementation or leverage Windows’ IOCP support from frameworks like AsyncIO or Twisted. On Windows, Tornado requires the WindowsSelectorEventLoop. This is the default in Python0 码力 | 869 页 | 692.83 KB | 1 年前3Tornado 6.1 Documentation
interact with blocking code. asyncio Integration Tornado is integrated with the standard library asyncio [https://docs.python.org/3.6/library/asyncio.html#module-asyncio] module and shares the same event since Tornado 5.0). In general, libraries designed for use with asyncio [https://docs.python.org/3.6/library/asyncio.html#module-asyncio] can be mixed freely with Tornado. Installation pip install tornado Windows (including multi-process mode) and scalability is limited (Even though Tornado is built on asyncio, which supports Windows, Tornado does not use the APIs that are necessary for scalable networking0 码力 | 931 页 | 708.03 KB | 1 年前3Tornado 6.5 Documentation
Tornado Authors May 22, 2025CONTENTS 1 Quick links 3 2 Hello, world 5 3 Threads and WSGI 7 4 asyncio Integration 9 5 Installation 11 6 Documentation 13 6.1 User’s guide . . . . . . . . . . . . . linksCHAPTER TWO 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 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;0 码力 | 272 页 | 1.12 MB | 2 月前3
共 368 条
- 1
- 2
- 3
- 4
- 5
- 6
- 37