Tornado 6.5 Documentationwrite("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__": RequestHandler which is subclassed to create web applications, and various supporting classes). • Client- and server-side implementions of HTTP (HTTPServer and AsyncHTTPClient). • An asynchronous networking function: from tornado.httpclient import HTTPClient def synchronous_fetch(url): http_client = HTTPClient() response = http_client.fetch(url) return response.body And here is the same function rewritten asynchronously0 码力 | 272 页 | 1.12 MB | 3 月前3
Tornado 6.4 Documentation
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__": RequestHandler which is subclassed to create web applications, and various supporting classes). • Client- and server-side implementions of HTTP (HTTPServer and AsyncHTTPClient). • An asynchronous networking function: from tornado.httpclient import HTTPClient def synchronous_fetch(url): http_client = HTTPClient() response = http_client.fetch(url) return response.body And here is the same function rewritten asynchronously0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.4 Documentation
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__": RequestHandler which is subclassed to create web applications, and various supporting classes). • Client- and server-side implementions of HTTP (HTTPServer and AsyncHTTPClient). • An asynchronous networking function: from tornado.httpclient import HTTPClient def synchronous_fetch(url): http_client = HTTPClient() response = http_client.fetch(url) return response.body And here is the same function rewritten asynchronously0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.4 Documentation
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__": RequestHandler which is subclassed to create web applications, and various supporting classes). • Client- and server-side implementions of HTTP (HTTPServer and AsyncHTTPClient). • An asynchronous networking function: from tornado.httpclient import HTTPClient def synchronous_fetch(url): http_client = HTTPClient() response = http_client.fetch(url) return response.body And here is the same function rewritten asynchronously0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.3 Documentation
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__": RequestHandler which is subclassed to create web applications, and various supporting classes). • Client- and server-side implementions of HTTP (HTTPServer and AsyncHTTPClient). • An asynchronous networking function: from tornado.httpclient import HTTPClient def synchronous_fetch(url): http_client = HTTPClient() response = http_client.fetch(url) return response.body And here is the same function rewritten asynchronously0 码力 | 264 页 | 1.06 MB | 1 年前3
Tornado 6.2 Documentation
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__": RequestHandler which is subclassed to create web applications, and various supporting classes). • Client- and server-side implementions of HTTP (HTTPServer and AsyncHTTPClient). • An asynchronous networking function: from tornado.httpclient import HTTPClient def synchronous_fetch(url): http_client = HTTPClient() response = http_client.fetch(url) return response.body And here is the same function rewritten asynchronously0 码力 | 260 页 | 1.06 MB | 1 年前3
Tornado 5.1 Documentation
RequestHandler which is subclassed to create web applications, and various supporting classes). • Client- and server-side implementions of HTTP (HTTPServer and AsyncHTTPClient). • An asynchronous networking than chaining callbacks. This is similar to the native coroutine feature introduced in Python 3.5 (async def). Native coroutines are recommended in place of the tornado.gen module when available. The Tornado function: from tornado.httpclient import HTTPClient def synchronous_fetch(url): http_client = HTTPClient() response = http_client.fetch(url) return response.body And here is the same function rewritten asynchronously0 码力 | 243 页 | 895.80 KB | 1 年前3
Tornado 6.1 Documentation
HTTP server tornado.httpclient — Asynchronous HTTP client tornado.httputil — Manipulate HTTP headers and URLs tornado.http1connection – HTTP/1.x client/server implementation Asynchronous networking tornado (including RequestHandler which is subclassed to create web applications, and various supporting classes). Client- and server-side implementions of HTTP (HTTPServer and AsyncHTTPClient). An asynchronous networking than chaining callbacks. This is similar to the native coroutine feature introduced in Python 3.5 (async def). Native coroutines are recommended in place of the tornado.gen module when available. The Tornado0 码力 | 931 页 | 708.03 KB | 1 年前3
Tornado 6.1 Documentation
RequestHandler which is subclassed to create web applications, and various supporting classes). • Client- and server-side implementions of HTTP (HTTPServer and AsyncHTTPClient). • An asynchronous networking than chaining callbacks. This is similar to the native coroutine feature introduced in Python 3.5 (async def). Native coroutines are recommended in place of the tornado.gen module when available. The Tornado function: from tornado.httpclient import HTTPClient def synchronous_fetch(url): http_client = HTTPClient() response = http_client.fetch(url) return response.body And here is the same function rewritten asynchronously0 码力 | 245 页 | 904.24 KB | 1 年前3
Tornado 6.0 Documentation
HTTP server tornado.httpclient — Asynchronous HTTP client tornado.httputil — Manipulate HTTP headers and URLs tornado.http1connection – HTTP/1.x client/server implementation Asynchronous networking tornado (including RequestHandler which is subclassed to create web applications, and various supporting classes). Client- and server-side implementions of HTTP (HTTPServer and AsyncHTTPClient). An asynchronous networking than chaining callbacks. This is similar to the native coroutine feature introduced in Python 3.5 (async def). Native coroutines are recommended in place of the tornado.gen module when available. The Tornado0 码力 | 869 页 | 692.83 KB | 1 年前3
共 20 条
- 1
- 2













