def getVariable(variable_name):
    my_server = redis.Redis(connection_pool=POOL)
response = my_server.get(variable_name)
return response

def setVariable(variable_name, variable_value):
    my_server = redis.Redis(connection_pool=POOL)
Managing connection to redis from Python