def get_redis_from_settings(settings):
 params = defaults.REDIS_PARAMS.copy()
 params.update(settings.getdict('REDIS_PARAMS'))
 for (source, dest) in SETTINGS_PARAMS_MAP.items():
  val = settings.get(source)
  if val:
   params[dest] = val
 if isinstance(params.get('redis_cls'), six.string_types):
  params['redis_cls'] = load_object(params['redis_cls'])
 return get_redis(**params)

def get_redis_from_settings ( settings ) : params = defaults . REDIS_PARAMS . copy ( ) params . update ( settings . getdict ( 'REDIS_PARAMS' ) ) for ( source , dest ) in SETTINGS_PARAMS_MAP . items ( ) : val = settings . get ( source ) if val : params [ dest ] = val if isinstance ( params . get ( 'redis_cls' ) , six . string_types ) : params [ 'redis_cls' ] = load_object ( params [ 'redis_cls' ] ) return get_redis ( ** params )
returns a redis client instance from given scrapy settings object .