Tornado 6.2 Documentation
it is not a focus of development and most applications should be written to use Tornado’s own interfaces (such as tornado.web) directly instead of using WSGI. In general, Tornado code is not thread-safe which do every- thing they are going to do before returning). There are many styles of asynchronous interfaces: • Callback argument • Return a placeholder (Future, Promise, Deferred) • Deliver to a queue get(self): http = tornado.httpclient.AsyncHTTPClient() response = await http.fetch("http://friendfeed-api.com/v2/feed/bret") json = tornado.escape.json_decode(response.body) (continues on next page) 26 Chapter0 码力 | 260 页 | 1.06 MB | 1 年前3
Tornado 5.1 Documentation
it is not a focus of development and most applications should be written to use Tornado’s own interfaces (such as tornado.web) directly instead of using WSGI. In general, Tornado code is not thread-safe which do everything they are going to do before returning). There are many styles of asynchronous interfaces: Callback argument Return a placeholder (Future, Promise, Deferred) Deliver to a queue Callback - api.com/v2/feed/bret") json = tornado.escape.json_decode(response.body) self.write("Fetched " + str(len(json["entries"])) + " entries " "from the FriendFeed API") For0 码力 | 359 页 | 347.32 KB | 1 年前3
Tornado 4.5 Documentation
which do everything they are going to do before returning). There are many styles of asynchronous interfaces: Callback argument Return a placeholder (Future, Promise, Deferred) Deliver to a queue Callback simply raise an exception (as opposed to the ad-hoc error handling common in callback-oriented interfaces), and Futures lend themselves well to use with coroutines. Coroutines will be discussed in depth else the user’s browser will simply hang. Here is an example that makes a call to the FriendFeed API using Tornado’s built-in AsyncHTTPClient: class MainHandler(tornado.web.RequestHandler): @tornado0 码力 | 333 页 | 322.34 KB | 1 年前3
Tornado 5.1 Documentation
it is not a focus of development and most applications should be written to use Tornado’s own interfaces (such as tornado.web) directly instead of using WSGI. In general, Tornado code is not thread-safe which do every- thing they are going to do before returning). There are many styles of asynchronous interfaces: • Callback argument • Return a placeholder (Future, Promise, Deferred) • Deliver to a queue fetch("http://friendfeed-api.com/v2/feed/bret") json = tornado.escape.json_decode(response.body) self.write("Fetched " + str(len(json["entries"])) + " entries " "from the FriendFeed API") For a more advanced0 码力 | 243 页 | 895.80 KB | 1 年前3
Tornado 6.4 Documentation
it is not a focus of development and most applications should be written to use Tornado’s own interfaces (such as tornado.web) directly instead of using WSGI. In general, Tornado code is not thread-safe which do every- thing they are going to do before returning). There are many styles of asynchronous interfaces: • Callback argument • Return a placeholder (Future, Promise, Deferred) • Deliver to a queue fetch("http://friendfeed-api.com/v2/feed/bret") json = tornado.escape.json_decode(response.body) self.write("Fetched " + str(len(json["entries"])) + " entries " "from the FriendFeed API") 26 Chapter 6. Documentation0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.4 Documentation
it is not a focus of development and most applications should be written to use Tornado’s own interfaces (such as tornado.web) directly instead of using WSGI. In general, Tornado code is not thread-safe which do every- thing they are going to do before returning). There are many styles of asynchronous interfaces: • Callback argument • Return a placeholder (Future, Promise, Deferred) • Deliver to a queue fetch("http://friendfeed-api.com/v2/feed/bret") json = tornado.escape.json_decode(response.body) self.write("Fetched " + str(len(json["entries"])) + " entries " "from the FriendFeed API") 26 Chapter 6. Documentation0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.4 Documentation
it is not a focus of development and most applications should be written to use Tornado’s own interfaces (such as tornado.web) directly instead of using WSGI. In general, Tornado code is not thread-safe which do every- thing they are going to do before returning). There are many styles of asynchronous interfaces: • Callback argument • Return a placeholder (Future, Promise, Deferred) • Deliver to a queue fetch("http://friendfeed-api.com/v2/feed/bret") json = tornado.escape.json_decode(response.body) self.write("Fetched " + str(len(json["entries"])) + " entries " "from the FriendFeed API") 26 Chapter 6. Documentation0 码力 | 268 页 | 1.09 MB | 1 年前3
Tornado 6.5 Documentationit is not a focus of development and most applications should be written to use Tornado’s own interfaces (such as tornado.web) directly instead of using WSGI. In general, Tornado code is not thread-safe which do every- thing they are going to do before returning). There are many styles of asynchronous interfaces: • Callback argument • Return a placeholder (Future, Promise, Deferred) • Deliver to a queue fetch("http://friendfeed-api.com/v2/feed/bret") json = tornado.escape.json_decode(response.body) self.write("Fetched " + str(len(json["entries"])) + " entries " "from the FriendFeed API") 26 Chapter 6. DocumentationTornado0 码力 | 272 页 | 1.12 MB | 3 月前3
Tornado 6.3 Documentation
it is not a focus of development and most applications should be written to use Tornado’s own interfaces (such as tornado.web) directly instead of using WSGI. In general, Tornado code is not thread-safe which do every- thing they are going to do before returning). There are many styles of asynchronous interfaces: • Callback argument • Return a placeholder (Future, Promise, Deferred) • Deliver to a queue fetch("http://friendfeed-api.com/v2/feed/bret") json = tornado.escape.json_decode(response.body) self.write("Fetched " + str(len(json["entries"])) + " entries " "from the FriendFeed API") 26 Chapter 6. Documentation0 码力 | 264 页 | 1.06 MB | 1 年前3
Tornado 6.2 Documentation
it is not a focus of development and most applications should be written to use Tornado’s own interfaces (such as tornado.web) directly instead of using WSGI. In general, Tornado code is not thread-safe which do everything they are going to do before returning). There are many styles of asynchronous interfaces: Callback argument Return a placeholder (Future, Promise, Deferred) Deliver to a queue Callback - api.com/v2/feed/bret") json = tornado.escape.json_decode(response.body) self.write("Fetched " + str(len(json["entries"])) + " entries " "from the FriendFeed API") For0 码力 | 407 页 | 385.03 KB | 1 年前3
共 20 条
- 1
- 2













