Perform the following operations:
FunctionGraph has integrated third-party library redis-py in its Python 2.7 and Python 3.6 runtimes. Therefore, you do not need to download any other Redis libraries.
# -*- coding:utf-8 -*-import redisdef handler (event, context):r = redis.StrictRedis(host="host_ip",password="passwd",port=6379)print(str(r.get("hostname")))return "^_^"