Building, testing, and deploying Falcon APIs using Zappa
Irrespective of other frameworks, Falcon requires the gunicorn library for execution. Gunicorn is a lightweight Python WSGI HTTP server. Falcon doesn't have any default behavior to server WSGI; instead, Falcon mainly focuses on API architectural styles and performance. Let's move on to executing the API in the local environment.
Local execution using gunicorn
For local execution, we are going to use gunicorn. The following is the log of the gunicorn execution:
$ gunicorn resources:api [2018-05-18 15:40:57 +0530] [31655] [INFO] Starting gunicorn 19.8.1 [2018-05-18 15:40:57 +0530] [31655] [INFO] Listening at: http://127.0.0.1:8000 (31655) [2018-05-18 15:40:57 +0530] [31655] [INFO] Using worker: sync [2018-05-18 15:40:57 +0530] [31662] [INFO] Booting worker with pid: 31662
We are using the resources module and the api object for the execution. We created the api object using the resources module.
API for the daily quote
We implemented the ...