Stay in the async_drone_service.py file in the root folder for the virtual environment (Tornado01). Add the following lines to map URL patterns to our previously coded subclasses of the RequestHandler superclass, which provide us with asynchronous methods for our request handlers. The following lines create the main entry point for the application, initialize it with the URL patterns for the API, and start listening for requests. The lines that are new or edited, compared to the synchronous version, are highlighted. The code file for the sample is included in the restful_python_2_11_01 folder, in the Django01/async_drone_service.py file:
class Application(web.Application): def __init__(self, **kwargs): handlers = [ (r"/hexacopters/([0-9]+)", AsyncHexacopterHandler), (r"...