Search the environment for the supplied keys, returning the first
		one found or None if none was found.
19110
def _search_env(keys):
		
		matches = (os.environ[key] for key in keys if key in os.environ)
		return next(matches, None)
1299217
def _find_value(key, *args):
    """'"""
    for arg in args:
        v = _get_value(arg, key)
        if v is not None:
            return v
572207
def find_object(self, key, layers):
        ''''''
        state = self.state

        if layers is None or layers == '':
            layers = state.layers.keys()
        for layer in layers:
            if key in state.layers[layer]:
                return state.layers[layer][key]
        return None
494619
def kb_mapping_exists(kb_name, key):
    
    try:
        kb = get_kb_by_name(kb_name)
    except NoResultFound:
        return False
    return key in kb.kbrvals
1047137
def _lookup(key):
    
    if key not in _CACHE:
        return None
    if _CACHE_COUNTER[key] >= len(_CACHE[key][1:]):
        if _CACHE[key][0] == "empty":
            return ""
        elif _CACHE[key][0] == "repeat" and _CACHE[key][1:]:
            return _CACHE[key][-1]
        elif _CACHE[key][0] == "repeat":
            return ""
        else:
            _CACHE_COUNTER[key] = 1
    else:
        _CACHE_COUNTER[key] += 1
    if _CACHE[key]:
        return _CACHE[key][_CACHE_COUNTER[key]]
    else:
        return ""
1162598
def get(key, default=None):
    '''
    
    '''
    store = load()

    if isinstance(key, six.string_types):
        return store.get(key, default)
    elif default is None:
        return [store[k] for k in key if k in store]
    else:
        return [store.get(k, default) for k in key]
1053373
def resolve(self, key):
        
        if key in self.vars:
            return self.vars[key]
        if key in self.parent:
            return self.parent[key]
        return self.environment.undefined(name=key)
587140
def get(self, key, default=None):
        
        try:
            return self[key]
        except KeyError:
            return default or self._default
848033
function keys(path, opts) {
  let env = toUnderscore(path);

  if (!opts.caseSensitive) {
    env = env.toUpperCase();
    return Object.keys(process.env).filter(key =>
      key.toUpperCase().startsWith(env)
    );
  }
  return Object.keys(process.env).filter(key => key.startsWith(env));
}
545569
def list_from_env(key, default=""):
    
    try:
        val = os.environ.get(key, default)
        return val.split(',')
    except (KeyError, ValueError):
        return []
746878
def lookup(source, keys, fallback = None):
  """"""
  try:
    for key in keys:
      source = source[key]
    return source
  except (KeyError, AttributeError, TypeError):
    return fallback
108127
def _find_corresponding_multicol_key(key, keys_multicol):
    """"""
    for mk in keys_multicol:
        if key.startswith(mk) and 'of' in key:
            return mk
    return None
902133
def Search(self,key):
		

		results = []
		for alert in self.alerts:
			if alert.id.lower().find(key.lower()) != -1:  results.append(alert)
			elif alert.name.lower().find(key.lower()) != -1:  results.append(alert)

		return(results)
560930
def find(key):
    
    docs = list(collection.find({KEY_FIELD: key}))
    # Return None if we didn't find anything.
    if not docs:
        return None
    pickled_value = docs[0][VALUE_FIELD]
    # Unpickle and return the value.
    return pickle.loads(pickled_value)
449412
def get(self, key, default=None):
        
        result = self._loads(self._client.get(self.get_key(key)))
        if result is not None:
            return result
        else:
            return default or self._default
1029598
def get(self, key, prompt_default='', prompt_help=''):
        """"""
        value = os.getenv(key)
        if not value:
            ns = self.namespace(key)
            value = self.keyring.get_password(ns, key)
        else:
            ns = 'environ'  
        if not value:
            ns = self.namespace(key, glob=True)
            value = self.keyring.get_password(ns, key)
        if not value:
            ns = ''
        if not value and self.prompt:
            value = self._prompt_for_value(key, prompt_default, prompt_help)
            if value:
                self.set(key, value)
        if ns:
            self.kns[key] = ns
        return value
852734
def get_environment(self, id=None, name=None):
        
        log.info("Picking environment: %s (%s)" % (name, id))
        return self.environments[id or name]