Chapter 10.  Working with Asynchronous Code, Testing, and Deploying an API with Tornado

In this chapter, we will take advantage of the non-blocking features combined with asynchronous operations in Tornado in a new version for the API we built in the previous chapter. We will configure, write, and execute unit tests and learn a few things related to deployment. We will cover  the following topics:

  • Understanding synchronous and asynchronous execution
  • Working with asynchronous code
  • Refactoring code to take advantage of asynchronous decorators
  • Mapping URL patterns to asynchronous and non-blocking request handlers
  • Making HTTP requests to the Tornado non-blocking API
  • Setting up unit tests
  • Writing a first round of unit tests
  • Running unit tests with nose2

Get Building RESTful Python Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.