#NEWLINE# def init_app( self , app , config_prefix = None ) : #NEWLINE# #INDENT# "Actual method to read Redis settings from app configuration and initialize the StrictRedis instance.\n\n        Positional arguments:\n        app -- Flask application instance.\n        config_prefix -- Prefix used in config key names in the Flask app's configuration. Useful for applications which\n            interface with more than one Redis server. Default value is 'REDIS'. Will be converted to upper case (e.g.\n            'REDIS_CACHE').\n            Examples:\n              REDIS_URL = 'redis://localhost/0'\n              REDIS_CACHE_URL = 'redis://localhost/1'\n        " #NEWLINE# config_prefix = ( config_prefix or 'REDIS' ) . rstrip ( '_' ) . upper ( ) #NEWLINE# if ( not hasattr ( app , 'extensions' ) ) : #NEWLINE# #INDENT# app . extensions = dict ( ) #NEWLINE# #UNINDENT# if ( config_prefix . lower ( ) in app . extensions ) : #NEWLINE# #INDENT# raise ValueError ( 'Already registered config prefix {0!r}.' . format ( config_prefix ) ) #NEWLINE# #UNINDENT# app . extensions [ config_prefix . lower ( ) ] = _RedisState ( self , app ) #NEWLINE# args = read_config ( app . config , config_prefix ) #NEWLINE# super ( Redis , self ) . __init__ ( ** args )