July 2018
Intermediate to advanced
324 pages
8h 14m
English
As we already designed our /quote?type=daily API to fetch a quote of the day, this API will return the quote if it exists in the database or else fetch it from the Mashape API and store it in the database. This operation is to prevent API failure in case the quote record does not exist in the database.
But we want to make sure that the quote record does exist in the database. For that, we are going to schedule a daily event that will occur at midnight. We will execute a function to perform the fetch quote operation.
The following is the Zappa settings snippet with events configuration.
File—zappa_settings.json:
{ "dev": { "app_function": "resources.api", "aws_region": "ap-south-1", "profile_name": ...Read now
Unlock full access