Sets the specified key value.

        :param str|unicode key:

        :param int|str|unicode value:

        :rtype: bool
551779
def set(self, key, value):
        
        return uwsgi.cache_set(key, value, self.timeout, self.name)
253874
def set_property(self, key, value):
        
        self.properties[key] = value
        self.sync_properties()
167201
def setValue(self, key, value, channel=1):
        
        if channel in self.CHANNELS:
            return self.CHANNELS[channel].setValue(key, value)

        LOG.error("HMDevice.setValue: channel not found %i!" % channel)
113991
def set(self, value, parse=False):
        
        self.value = self.parse(value) if parse else value
626131
def set(self, key, value):
        
        task = Task.current_task()
        try:
            context = task._context
        except AttributeError:
            task._context = context = {}
        context[key] = value
247465
def add(self, key: str, value: str):
        
        if key in self:
            # Use super to get mutable set
            super().__getitem__(key).add(value)
        else:
            self[key] = {value}
745605
def set(self, key, value):
        ""
        # if key already in data, update indexes
        if not isinstance(value, dict):
            raise BadValueError(
                'The value {} is incorrect.'
                ' Values should be strings'.format(value))
        _value = deepcopy(value)
        if key in self.data:
            self.delete_from_index(key)
        self.data[key] = _value
        self.update_index(key, _value)
779125
def set_value(cache, key, value):
    
    with cache as redis_connection:
        return redis_connection.set(key, value)
272786
def set(self, section, key, value):
        

        conf = self.get_section_config(section)
        if isinstance(value, bool):
            conf[key] = str(value)
        else:
            conf[key] = value
        self.set_section_config(section, conf)
845159
def store(self, key, value):
        
        self.client.set(key, value, time=self.timeout)
333865
def set(self, key, value):
        
        # the configuration changes, so we invalidate the cached config
        self._full_config = None
        self._override[key] = value
44359
def set_value(dct, key, value):
    
    if '.' in key:
        head, rest = key.split('.', 1)
        target = dct.setdefault(head, {})
        if not isinstance(target, dict):
            raise ValueError(
                'Cannot set {key} in {head} '
                'due to existing value: {target}'.format(key=key, head=head, target=target),
            )
        set_value(target, rest, value)
    else:
        dct[key] = value
1035965
def set_value(self, key, value):
        # type: (str, Any) -> None
        
        self._ensure_have_load_only()

        fname, parser = self._get_parser_to_modify()

        if parser is not None:
            section, name = _disassemble_key(key)

            # Modify the parser and the configuration
            if not parser.has_section(section):
                parser.add_section(section)
            parser.set(section, name, value)

        self._config[self.load_only][key] = value
        self._mark_as_modified(fname, parser)
882024
def set(self, key, value, timeout=None):
        
        key = self.make_key(key)
        if timeout is None:
            timeout = self.default_timeout

        if self.debug:
            return True

        pickled_value = pickle.dumps(value)
        self.metrics['writes'] += 1
        if timeout:
            return self.database.setex(key, int(timeout), pickled_value)
        else:
            return self.database.set(key, pickled_value)
745216
def setValue(self, value):
        
        self.__value = projex.text.decoded(value) if isinstance(value, (str, unicode)) else value
732773
def set(self, key, val):
        
        data = self.get_data(True)
        if data is not None:
            data[key] = val
        else:
            raise RuntimeError("No task is currently running")
779607
def set(self, value):
        

        if not isinstance(value, str_cls):
            raise TypeError(unwrap(
                '''
                %s value must be a unicode string, not %s
                ''',
                type_name(self),
                type_name(value)
            ))

        self._unicode = value
        self.contents = iri_to_uri(value)
        self._header = None
        if self._trailer != b'':
            self._trailer = b''