Tornado 6.1 Documentation
repository as well. Prerequisites: Tornado 6.0 requires Python 3.5.2 or newer (See Tornado 5.1 if compatibility with Python 2.7 is required). The following optional packages may be useful: • pycurl is used http_client = AsyncHTTPClient() response = await http_client.fetch(url) return response.body Or for compatibility with older versions of Python, using the tornado.gen module: from tornado.httpclient import AsyncHTTPClient and await keywords (functions using these keywords are also called “native coroutines”). For compatibility with older versions of Python, you can use “decorated” or “yield-based” coroutines using the tornado0 码力 | 245 页 | 904.24 KB | 1 年前3Tornado 6.0 Documentation
repository as well. Prerequisites: Tornado 6.0 requires Python 3.5.2 or newer (See Tornado 5.1 if compatibility with Python 2.7 is required). The following optional packages may be useful: • pycurl is used http_client = AsyncHTTPClient() response = await http_client.fetch(url) return response.body Or for compatibility with older versions of Python, using the tornado.gen module: 14 Chapter 6. Documentation Tornado and await keywords (functions using these keywords are also called “native coroutines”). For compatibility with older versions of Python, you can use “decorated” or “yield-based” coroutines using the tornado0 码力 | 245 页 | 885.76 KB | 1 年前3Tornado 5.1 Documentation
http_client = AsyncHTTPClient() response = await http_client.fetch(url) return response.body Or for compatibility with older versions of Python, using the tornado.gen module: from tornado.httpclient import AsyncHTTPClient and await keywords (functions using these keywords are also called “native coroutines”). For compatibility with older versions of Python, you can use “decorated” or “yield-based” coroutines using the tornado Native coroutines are the recommended form whenever possible. Only use decorated coroutines when compatibility with older versions of Python is required. Examples in the tornado documentation will generally0 码力 | 243 页 | 895.80 KB | 1 年前3Tornado 4.5 Documentation
decorator, and await in place of yield. The rest of this document still uses the yield style for compatibility with older versions of Python, but async and await will run faster when they are available: async Application object is responsible for global configuration, including the routing table that maps requests to handlers. The routing table is a list of URLSpec objects (or tuples), each of which contains (at least) SEO-friendly manner. RedirectHandler lets you configure redirects directly in your Application routing table. For example, to configure a single static redirect: app = tornado.web.Application([ url(r"/app"0 码力 | 333 页 | 322.34 KB | 1 年前3Tornado 4.5 Documentation
decorator, and await in place of yield. The rest of this document still uses the yield style for compatibility with older versions of Python, but async and await will run faster when they are available: async Application object is responsible for global configuration, including the routing table that maps requests to handlers. The routing table is a list of URLSpec objects (or tuples), each of which contains (at least) SEO-friendly manner. RedirectHandler lets you configure redirects directly in your Application routing table. For example, to configure a single static redirect: app = tornado.web.Application([ url(r"/app"0 码力 | 222 页 | 833.04 KB | 1 年前3Tornado 6.5 Documentation
http_client = AsyncHTTPClient() response = await http_client.fetch(url) return response.body Or for compatibility with older versions of Python, using the tornado.gen module: 14 Chapter 6. DocumentationTornado and await keywords (functions using these keywords are also called “native corou- tines”). For compatibility with older versions of Python, you can use “decorated” or “yield-based” coroutines using the tornado Native coroutines are the recommended form whenever possible. Only use decorated coroutines when compatibility with older versions of Python is required. Examples in the Tornado documentation will generally0 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.4 Documentation
http_client = AsyncHTTPClient() response = await http_client.fetch(url) return response.body Or for compatibility with older versions of Python, using the tornado.gen module: 14 Chapter 6. Documentation Tornado and await keywords (functions using these keywords are also called “native corou- tines”). For compatibility with older versions of Python, you can use “decorated” or “yield-based” coroutines using the tornado Native coroutines are the recommended form whenever possible. Only use decorated coroutines when compatibility with older versions of Python is required. Examples in the Tornado documentation will generally0 码力 | 268 页 | 1.09 MB | 1 年前3Tornado 6.4 Documentation
http_client = AsyncHTTPClient() response = await http_client.fetch(url) return response.body Or for compatibility with older versions of Python, using the tornado.gen module: 14 Chapter 6. Documentation Tornado and await keywords (functions using these keywords are also called “native corou- tines”). For compatibility with older versions of Python, you can use “decorated” or “yield-based” coroutines using the tornado Native coroutines are the recommended form whenever possible. Only use decorated coroutines when compatibility with older versions of Python is required. Examples in the Tornado documentation will generally0 码力 | 268 页 | 1.09 MB | 1 年前3Tornado 6.4 Documentation
http_client = AsyncHTTPClient() response = await http_client.fetch(url) return response.body Or for compatibility with older versions of Python, using the tornado.gen module: 14 Chapter 6. Documentation Tornado and await keywords (functions using these keywords are also called “native corou- tines”). For compatibility with older versions of Python, you can use “decorated” or “yield-based” coroutines using the tornado Native coroutines are the recommended form whenever possible. Only use decorated coroutines when compatibility with older versions of Python is required. Examples in the Tornado documentation will generally0 码力 | 268 页 | 1.09 MB | 1 年前3Tornado 6.3 Documentation
http_client = AsyncHTTPClient() response = await http_client.fetch(url) return response.body Or for compatibility with older versions of Python, using the tornado.gen module: 14 Chapter 6. Documentation Tornado and await keywords (functions using these keywords are also called “native corou- tines”). For compatibility with older versions of Python, you can use “decorated” or “yield-based” coroutines using the tornado Native coroutines are the recommended form whenever possible. Only use decorated coroutines when compatibility with older versions of Python is required. Examples in the Tornado documentation will generally0 码力 | 264 页 | 1.06 MB | 1 年前3
共 20 条
- 1
- 2