When redis is used in a flask app I often see this:
def create_app(): app = Flask(__name__) app.redis = Redis(host=\'redis\', port=6379)