Airport Codes: Code
1 import redis 2 3 def main(args): 4 redis_client = redis.StrictRedis(…) 5 code = args[‘request’][‘intent’][‘slots’][‘Code’][‘value’]; 6 a = redis_client.hgetall(“code:” + code) 7 airport_info = “Airport code ” + code 8 airport_info += ” is for ” + a[‘name’] 9 airport_info += ” in ” + a[‘country’] 10 11 speech = {“type”: “PlainText”, “text”: airport_info} 12 response = {“shouldEndSession”: “true”, “outputSpeech”: spe 13 return {“version”: “1.0”, “response”: response} @lornajane