tornadoweb.org
域名年龄: 16年4个月6天HTTP/1.1 301 永久重定向 服务器:GitHub.com 访问时间:2019年09月19日 15:28:51 类型:text/html 文件大小:162 目标网址:http://www.tornadoweb.org/ X-GitHub-Request-Id: AB22:6093:DC9E2:127466:5D832E33 HTTP/1.1 302 FOUND 访问时间:2019年09月19日 15:28:51 类型:text/html; charset=utf-8 Transfer-Encoding: chunked 连接:keep-alive 设置Cookie:__cfduid=dfeb952d33d5c23a1a79a20a456e7c3c41568878131; expires=Fri, 18-Sep-20 07:28:51 GMT; path=/; domain=.www.tornadoweb.org; HttpOnly 目标网址:http://www.tornadoweb.org/en/stable/ X-Served: Flask X-Redirect-From: Flask X-Deity: web02 服务器:cloudflare CF-RAY: 5189d86429cacd83-CDG HTTP/1.1 200 OK 访问时间:2019年09月19日 15:28:51 类型:text/html Transfer-Encoding: chunked 连接:keep-alive 设置Cookie:__cfduid=d26a9b37a02375dcd7bb5f02437a4889d1568878132; expires=Fri, 18-Sep-20 07:28:52 GMT; path=/; domain=.www.tornadoweb.org; HttpOnly 修改日期:2019年06月24日 06:37:58 动作:Accept-Encoding X-Cname-TryFiles: True X-Served: Nginx X-Deity: web02 服务器:cloudflare CF-RAY: 5189d8655cffcd83-CDG Content-Encoding: gzip 页面编码:utf-8
TornadostableUser’s guideWeb frameworkHTTP servers and clientsAsynchronous networkingCoroutines and concurrencyIntegration with other servicesUtilitiesFrequently Asked QuestionsRelease notesTornadoDocs »Tornado Web ServerEdit on GitHub¶Tornado is a Python web framework andasynchronous networking library, originally developed at FriendFeed. By using non-blocking network I/O, Tornadocan scale to tens of thousands of open connections, making it ideal forlong polling,WebSockets, and otherapplications that require a long-lived connection to each user.Quick links¶Current version: 6.0.3 (download from PyPI, release notes)Source (GitHub)Mailing lists: discussion and announcementsStack OverflowWikiHello, world¶Here is a simple “Hello, world” example web app for Tornado:import tornado.ioloopimport tornado.webclass MainHandler(tornado.web.RequestHandler):def get(self):self.write("Hello, world")def make_app():return tornado.web.Application([(r"/", MainHandler),])if __name__ == "__main__":app = make_app()app.listen(8888)tornado.ioloop.IOLoop.current().start()This example does not use any of Tornado’s asynchronous features; forthat see this simple chat room.Threads and WSGI¶Tornado is different from most Python web frameworks. It is not basedon WSGI, and it istypically run with only one thread per process. See the User’s guidefor more on Tornado’s approach to asynchronous programming.While some support of WSGI is available in the tornado.wsgi module,it is not a focus of development and most applications should bewritten to use Tornado’s own interfaces (such as tornado.web)directly instead of using WSGI.In general, Tornado code is not thread-safe. The only method inTornado that is safe to call from other threads isIOLoop.add_callback. You can also use IOLoop.run_in_executor toasynchronously run a blocking function on another thread, but notethat the function passed to run_in_executor should avoidreferencing any Tornado objects. run_in_executor is therecommended way to interact with blocking code.asyncio Integration¶Tornado is integrated with the standard library asyncio module andshares the same event loop (by default since Tornado 5.0). In general,libraries designed for use with asyncio can be mixed freely withTornado.Installation¶pip install tornadoTornado is listed in PyPI andcan be installed with pip. Note that the source distributionincludes demo applications that are not present when Tornado isinstalled in this way, so you may wish to download a copy of thesource tarball or clone the git repository as well.Prerequisites: Tornado 6.0 requires Python 3.5.2 or newer (SeeTornado 5.1 ifcompatibility with Python 2.7 is required). The following optionalpackages may be useful:pycurl is used by the optionaltornado.curl_httpclient. Libcurl version 7.22 or higher is required.Twisted may be used with the classes intornado.platform.twisted.pycares is an alternativenon-blocking DNS resolver that can be used when threads are notappr
© 2010 - 2020 网站综合信息查询 同IP网站查询 相关类似网站查询 网站备案查询网站地图 最新查询 最近更新 优秀网站 热门网站 全部网站 同IP查询 备案查询
2026-01-09 01:46, Process in 0.0143 second.