Get feature flag record from redis.

        :param feature_key: key for feature flag

        :return: value of feature flag key in redis.

        :raises: KeyError if key is not found.
185238
def get_flag_record(self, feature_key: str) -> str:
        
        key_name = self._format_key_name()
        flag = self.redis.hget(key_name, feature_key)

        if flag is None:
            raise KeyError('Redis key: {0} not found.'.format(key_name))

        return flag
869516
def rpc(self, feature, cmd, *args, **kw):
        

        rpc_id = (feature << 8 | cmd)

        result_format = _create_resp_format(kw.get('result_type'), kw.get('result_format'))
        arg_format = kw.get('arg_format')
        if arg_format is None:
            arg_format = _create_arg_format(args)

        passed_kw = {}
        if 'timeout' in kw:
            passed_kw['timeout'] = kw['timeout']

        response = self.rpc_v2(rpc_id, arg_format, result_format, *args, **passed_kw)

        old_return = kw.get('result_type')
        if old_return is not None:
            return _create_old_return_value(response, *old_return)

        return response
1285924
def redis_key(cls, key):
        
        keyspace = cls.keyspace
        tpl = cls.keyspace_template
        key = "%s" % key if keyspace is None else tpl % (keyspace, key)
        return cls.keyparse.encode(key)
99433
public function getFeatureVariableFromKey($featureFlagKey, $variableKey)
    {
        $featureFlag = $this->getFeatureFlagFromKey($featureFlagKey);
        if ($featureFlag && !($featureFlag->getKey())) {
            return null;
        }

        if (isset($this->_featureFlagVariableMap[$featureFlagKey])
            && isset($this->_featureFlagVariableMap[$featureFlagKey][$variableKey])
        ) {
            return $this->_featureFlagVariableMap[$featureFlagKey][$variableKey];
        }

        $this->_logger->log(
            Logger::ERROR,
            sprintf(
                'No variable key "%s" defined in datafile for feature flag "%s".',
                $variableKey,
                $featureFlagKey
            )
        );
        $this->_errorHandler->handleError(
            new InvalidFeatureVariableException('Provided feature variable is not in datafile.')
        );
        return null;
    }
265467
def get_object_key(self, key, using_name=True):
        
        try:
            if using_name:
                return self.o_name[key].key
            else:
                return self.o[key].key
        except KeyError:
            raise ValueError("'%s' are not found!" % key)
828217
def get_feature(self, feature_id):
        
        route_values = {}
        if feature_id is not None:
            route_values['featureId'] = self._serialize.url('feature_id', feature_id, 'str')
        response = self._send(http_method='GET',
                              location_id='c4209f25-7a27-41dd-9f04-06080c7b6afd',
                              version='5.0-preview.1',
                              route_values=route_values)
        return self._deserialize('ContributedFeature', response)
27489
private Instance getExistingKey(final String _key)
    {
        Instance ret = null;
        try {
            final QueryBuilder queryBldr = new QueryBuilder(Type.get(DBPropertiesUpdate.TYPE_PROPERTIES));
            queryBldr.addWhereAttrEqValue("Key", _key);
            queryBldr.addWhereAttrEqValue("BundleID", this.bundleInstance);
            final InstanceQuery query = queryBldr.getQuery();
            query.executeWithoutAccessCheck();
            if (query.next()) {
                ret = query.getCurrentValue();
            }
        } catch (final EFapsException e) {
            DBPropertiesUpdate.LOG.error("getExisting()", e);
        }
        return ret;
    }
742732
def get(self, key, default=None):
        
        """
        segments = key.split('.')
        result = reduce(
            lambda dct, k: dct and dct.get(k) or None,
            segments, self.data)

        return result or default
293574
def fetch(bank, key):
    '''
    
    '''
    redis_server = _get_redis_server()
    redis_key = _get_key_redis_key(bank, key)
    redis_value = None
    try:
        redis_value = redis_server.get(redis_key)
    except (RedisConnectionError, RedisResponseError) as rerr:
        mesg = 'Cannot fetch the Redis cache key {rkey}: {rerr}'.format(rkey=redis_key,
                                                                        rerr=rerr)
        log.error(mesg)
        raise SaltCacheError(mesg)
    if redis_value is None:
        return {}
    return __context__['serial'].loads(redis_value)
1039230
def get_string_counter(fc, feature_name):
    '''

    '''
    if feature_name not in fc:
        feature = fc.get(FC.DISPLAY_PREFIX + feature_name)
    else:
        feature = fc.get(feature_name)
    if isinstance(feature, StringCounter):
        return feature
    else:
        return None
756987
def get_sp_key(self):
        
        key = self.__sp.get('privateKey')
        key_file_name = self.__paths['cert'] + 'sp.key'

        if not key and exists(key_file_name):
            with open(key_file_name) as f:
                key = f.read()

        return key or None
6816
def get_name(self, key):
        '''
        '''
        try:
            return self.nameDict[key]
        except IndexError as e:
            print 'IndexError {0}: {1}'.format(e.errno, e.strerror)
1019995
def get_all_feature_flags(self, user_email=None):
        
        query_parameters = {}
        if user_email is not None:
            query_parameters['userEmail'] = self._serialize.query('user_email', user_email, 'str')
        response = self._send(http_method='GET',
                              location_id='3e2b80f8-9e6f-441e-8393-005610692d9c',
                              version='5.0-preview.1',
                              query_parameters=query_parameters)
        return self._deserialize('[FeatureFlag]', self._unwrap_collection(response))
399565
def get(self, key, env=None):
        
        if env is None:
            env = self.environment
        try:
            ret = self._settings[env][key]
        except KeyError:
            ret = None
        if ret is None:
            # See if it's set in the environment
            if key == "identity_class":
                # This is defined via the identity_type
                env_var = self.env_dct.get("identity_type")
                ityp = os.environ.get(env_var)
                if ityp:
                    return _import_identity(ityp)
            else:
                env_var = self.env_dct.get(key)
            if env_var is not None:
                ret = os.environ.get(env_var)
        return ret
1251477
def get(self, key):
        
        if not self.servers:
            return self.miss

        key = self._qualified_key(key)
        hashed_key = self.key_hasher(key)
        entry = self.client.get(hashed_key)

        if isinstance(entry, tuple) and len(entry) == 2:
            key_, result = entry
            if key_ == key:
                self.logger("HIT: %s", key)
                return result

        self.logger("MISS: %s", key)
        return self.miss
446609
def getKey(self, key):
		
		data = self.getDictionary()
		if key in data:
			return data[key]
		else:
			return None
890150
def get_prop(self, key, default_val=None):
        
        if self.props.has_key(key):
            return self.props[key]
        else:
            return default_val