def setup_redis():
 pools = {}
 for (name, config) in settings.STREAM_REDIS_CONFIG.items():
  pool = redis.ConnectionPool(host=config['host'], port=config['port'], password=config.get('password'), db=config['db'], decode_responses=True)
  pools[name] = pool
 return pools

def setup_redis ( ) : pools = { } for ( name , config ) in settings . STREAM_REDIS_CONFIG . items ( ) : pool = redis . ConnectionPool ( host = config [ 'host' ] , port = config [ 'port' ] , password = config . get ( 'password' ) , db = config [ 'db' ] , decode_responses = True ) pools [ name ] = pool return pools
generate config for redis cache .