Converts the value and adds it as a data field.

        Args:
            key:
            value:
493452
def add_key_value(self, key, value):
        
        key = self._metadata_map.get(key, key)
        if key in ['dateAdded', 'lastModified']:
            self._data[key] = self._utils.format_datetime(value, date_format='%Y-%m-%dT%H:%M:%SZ')
        elif key == 'confidence':
            self._data[key] = int(value)
        elif key == 'rating':
            self._data[key] = float(value)
        elif key == 'unique_id':
            self._unique_id = quote_plus(value)
        else:
            self._data[key] = value
109493
def setValue(self, key, value):
        
        curr = self._stack[-1]
        curr[key] = value
955833
def insert(key, value):
    
    # Pickle the value.
    value = pickle.dumps(value, protocol=constants.PICKLE_PROTOCOL)
    # Store the value as binary data in a document.
    doc = {
        KEY_FIELD: key,
        VALUE_FIELD: Binary(value)
    }
    # Pickle and store the value with its key. If the key already exists, we
    # don't insert (since the key is a unique index), and we don't care.
    try:
        return collection.insert(doc)
    except pymongo.errors.DuplicateKeyError:
        return None
781738
def put(self, key, value):
    ''''''
    self.shardDatastore(key).put(key, value)
1069045
def create_and_add(self, key, value=None, cas=0, **options):
        
        itm = Item(key, value)
        itm.cas = cas
        return self.add(itm, **options)
909593
def add_field(self, name, data):
        
        if name in self._fields:
            raise ValueError
        if not len(data) == self._num_fix:
            raise ValueError
        self._fields.append(name)
        self.__dict__[name] = data
64059
function put(key, value) {
  const { schema, table } = findSchemaAndTable(key),
    map = columnToValueMap('id', key); // create the value map

  // add data to the map
  columnToValueMap('data', wrapInObject(key, parseOrNot(value)), map);

  let url;

  if (isUri(key)) {
    url = decode(key.split('/_uris/').pop());

    // add url column to map if we're PUTting a uri
    columnToValueMap('url', url, map);
  }


  return onConflictPut(map, schema, table)
    .then(() => map.data);
}
134697
def put(self, key, value):
    '''
    '''
    key = self._service_key(key)
    self._service_ops['put'](key, value)
172121
def _handle_key_value(t_dict, key, value):
    
    if key in t_dict:
        val = t_dict[key]
        if isinstance(val, str):
            val = [val]
        val.append(value)
        return val
    return value
1162214
def put(self, key, value):
    '''
    '''

    value = self.serializedValue(value)
    self.child_datastore.put(key, value)
477700
def add(self, key, value):
        
        if not key in self.prefs:
            self.prefs[key] = []
        self.prefs[key].append(value)
1358931
public void setData(String key, Object value) {
        this.data = this.data.addData(key, value);
    }
924890
def add_metadata(self, key, value):
        
        self._metadata[key] = value

        # write the current metadata to file
        json.dump(self._metadata, open(self.metadata_filename, 'w'),
                  indent=JSON_INDENT,
                  sort_keys=True)
774518
def set_attribute(self, key, value):
        
        if not isinstance(key, str) or not isinstance(value, str):
            raise ValueError("The arguments 'key' and 'value' must both be "
                             "strings. Instead they are {} and {}.".format(
                                 key, value))
        self.extra_data[key] = value
466456
def add_data(self, id, key, value):
        
        self[str(id)]['data'].setdefault(key, [])
        self[str(id)]['data'][key].append(value)
994435
def key_value(self, *args, **kwargs):
        
        new_df = copy_df(self)
        fields = _render_field_set(args)
        self._assert_ml_fields_valid(*fields)
        new_df._perform_operation(
            op.FieldKVConfigOperation(dict((_get_field_name(f), KVConfig(**kwargs)) for f in fields)))
        return new_df
597737
def add(self, key, value):
        
        if isinstance(value, list):
            # TODO: support env vars in list w/masked values
            for val in value:
                self._add_arg_python(key, val)
        elif isinstance(value, dict):
            err = 'Dictionary types are not currently supported for field.'
            print('{}{}{}'.format(c.Style.BRIGHT, c.Fore.RED, err))
        else:
            mask = False
            env_var = re.compile(r'^\$env\.(.*)$')
            envs_var = re.compile(r'^\$envs\.(.*)$')

            if env_var.match(str(value)):
                # read value from environment variable
                env_key = env_var.match(str(value)).groups()[0]
                value = os.environ.get(env_key, value)
            elif envs_var.match(str(value)):
                # read secure value from environment variable
                env_key = envs_var.match(str(value)).groups()[0]
                value = os.environ.get(env_key, value)
                mask = True
            self._add_arg(key, value, mask)