Updates this configuration object from a dictionary.

        See :meth:`ConfigurationObject.update` for details.

        :param dct: Values to update the ConfigurationObject with.
        :type dct: dict
509683
def update_from_dict(self, dct):
        
        if not dct:
            return
        all_props = self.__class__.CONFIG_PROPERTIES
        for key, value in six.iteritems(dct):
            attr_config = all_props.get(key)
            if attr_config:
                setattr(self, key, value)
            else:
                self.update_default_from_dict(key, value)
894286
def update_config(self, key, value):
        
        dataset = self._top._config.dataset
        session = object_session(self._top._config)
        logger.debug(
            'Updating VarDictGroup config. dataset: {}, type: {}, key: {}, value: {}'.format(
                dataset, self._top._type, key, value))

        if not self._parent._config:
            self._parent.update_config()

        # create or update group config
        self._config, created = get_or_create(
            session, Config,
            d_vid=dataset.vid, type=self._top._type,
            parent=self._parent._config, group=self._key,
            key=self._key,dataset=dataset)
        self._top._add_valid(self._config)

        # create or update value config
        config, created = get_or_create(
            session, Config, parent=self._config, d_vid=dataset.vid,
            type=self._top._type, key=key,dataset=dataset)

        if config.value != value:
            # sync db value with term value.
            config.value = value
            session.merge(config)
            session.commit()
            logger.debug(
                'Config bound to the VarDictGroup key updated. config: {}'.format(config))
        self._top._add_valid(config)
728154
def _nodeSetValuesFromDict(self, dct):
        
        if 'choices' in dct:
            self._configValues = list(dct['choices'])
            self._displayValues = list(dct['choices'])
        super(ChoiceCti, self)._nodeSetValuesFromDict(dct)
927662
def get_flattened(dct, names, path_joiner="_"):
  
  new_dct = dict()
  for key, val in dct.items():
    if key in names:
      child = {path_joiner.join(k): v for k, v in flatten_dict(val, (key, ))}
      new_dct.update(child)
    else:
      new_dct[key] = dct[key]
  return new_dct
661959
def update(self, conf_dict):
        '''
        
        '''

        if isinstance(conf_dict, dict):
            iterator = six.iteritems(conf_dict)
        else:
            iterator = iter(conf_dict)

        for k, v in iterator:
            if not IDENTIFIER.match(k):
                raise ValueError('\'%s\' is not a valid indentifier' % k)

            cur_val = self.__values__.get(k)

            if isinstance(cur_val, Config):
                cur_val.update(conf_dict[k])
            else:
                self[k] = conf_dict[k]
625977
def all_pass_dict(f, dct):
    
    return all(map_with_obj_to_values(
        lambda key, value: f(key, value),
        dct
    ))
596030
def augment(self, dct: NonAugmentedDict,
                document: Optional[YamlDocument] = None) -> AugmentedDict:
        
        Validator.instance_of(dict, raise_ex=True, dct=dct)

        # Apply any configured loader
        for instance in self._extensions:
            nodes = list(dict_find_pattern(dct, **instance.config()))
            for parent, k, val in nodes:
                parent.pop(k)
                fragment = instance.apply(
                    ExtensionContext(
                        mentor=self,
                        document=document or dct,
                        dct=dct,
                        parent_node=parent,
                        node=(k, val)
                    )
                )
                if fragment is not None:
                    parent.update(fragment)

        return dct
208990
def omit(dct, *keys):
    
    copy = dict()
    for key in dct:
        if key not in keys:
            copy[key] = dct[key]
    return copy
944305
def update(self, dictionary=None, **kwargs):
        
        if not dictionary == None: kwargs.update(dictionary)
        for k in list(kwargs.keys()): self[k] = kwargs[k]
558617
def update_component(name, comp, component_dict):
    
    for dia in component_dict.get('dialogues', ()):
        try:
            comp.add_dialogue(*_get_pair(dia))
        except Exception as e:
            msg = 'In device %s, malformed dialogue %s\n%r'
            raise Exception(msg % (name, dia, e))

    for prop_name, prop_dict in component_dict.get('properties', {}).items():
        try:
            getter = (_get_pair(prop_dict['getter'])
                      if 'getter' in prop_dict else None)
            setter = (_get_triplet(prop_dict['setter'])
                      if 'setter' in prop_dict else None)
            comp.add_property(prop_name, prop_dict.get('default', ''),
                              getter, setter, prop_dict.get('specs', {}))
        except Exception as e:
            msg = 'In device %s, malformed property %s\n%r'
            raise type(e)(msg % (name, prop_name, format_exc()))
895611
def update(self, other, **kwargs):
        
        if other is None: return

        if not isinstance(other, dict):
            other = other.to_dict()
        self.__dict__.update(other, **kwargs)
385555
def update(self, *args, **kwargs):
        
        d = {}
        d.update(*args, **kwargs)
        for key, value in d.items():
            self[key] = value
368443
def _updatecopy(orig, update_with, keys=None, override=False):
    
    d = orig.copy()
    if keys is None:
        keys = update_with.keys()
    for k in keys:
        if k in update_with:
            if k in d and not override:
                continue
            d[k] = update_with[k]
    return d
474629
def update_dict(self,*args, **kwargs):
        
        super(Dict, self).update(*args, **kwargs)
607939
def update(self, **kwargs):
        
        if not self.object_id:
            return False

        url = self.build_url(
            self._endpoints.get('item').format(id=self.object_id))

        data = {self._cc(key): value for key, value in kwargs.items() if
                key in {'name',
                        'description'}}  # convert keys to protocol casing
        if not data:
            return False

        response = self.con.patch(url, data=data)
        if not response:
            return False

        new_data = response.json()

        for key in data:
            value = new_data.get(key, None)
            if value:
                setattr(self, self.protocol.to_api_case(key), value)

        return True
27251
def update_model_dict(self):
        """"""
        dct = {}
        models = self.chimera.openModels
        for md in models.list():
            dct[md.name] = md.id
        self.model_dict = dct
1260006
def _recursive_dict_update(dict_, other, **kwargs):
    
    overwrite = kwargs['overwrite']

    for key, other_value in iteritems(other):
        if key in dict_:
            value = dict_[key]
            if is_mapping(value) and is_mapping(other_value):
                _recursive_dict_update(value, other_value, overwrite=overwrite)
                continue
        if overwrite:
            dict_[key] = other_value
        else:
            dict_.setdefault(key, other_value)