Set the value and expiration in milliseconds of a key.

        :raises TypeError: if milliseconds is not int
430008
def psetex(self, key, milliseconds, value):
        
        if not isinstance(milliseconds, int):
            raise TypeError("milliseconds argument must be int")
        fut = self.execute(b'PSETEX', key, milliseconds, value)
        return wait_ok(fut)
1016617
def set_time_rate(self, value):
        '''
        
        '''
        if isinstance(value, float) is False:
            raise TypeError("The type of __time_rate must be float.")

        if value <= 0.0:
            raise ValueError("The value of __time_rate must be greater than 0.0")

        self.__time_rate = value
1371463
def set(self, value: int):
        
        max_value = int(''.join(['1' for _ in range(self._bit_width)]), 2)

        if value > max_value:
            raise ValueError('the value {} is larger than '
                             'the maximum value {}'.format(value, max_value))

        self._value = value
        self._text_update()
1229052
def set(self, key, value):
        
        d = self.data.data
        keys = key.split('.')
        latest = keys.pop()
        for k in keys:
            d = d.setdefault(k, {})

        schema = Schema().load(self.schema_file)

        self.data.internal = schema.internal
        self.parse_value(d, '', key, value, schema.get(key))
        self.data.save(self.data_file)
10749
def pexpireat(self, key, timestamp):
        
        if not isinstance(timestamp, int):
            raise TypeError("timestamp argument must be int, not {!r}"
                            .format(timestamp))
        fut = self.execute(b'PEXPIREAT', key, timestamp)
        return wait_convert(fut, bool)
220428
def setnx(self, key, value):
        """"""
        fut = self.execute(b'SETNX', key, value)
        return wait_convert(fut, bool)
1099101
def set?(key)
      check_key!(key)
      expires!(key)
      @data.keys.include?(key.to_s)
    end
977643
def _set_thing(self, thing, value):
        """"""
        try:
            value = int(value)
        except (TypeError, ValueError):
            raise TypeError(
                f'Changing the {thing} of a `Date` instance is only '
                f'allowed via numbers, but the given value `{value}` '
                f'is of type `{type(value)}` instead.')
        kwargs = {}
        for unit in ('year', 'month', 'day', 'hour', 'minute', 'second'):
            kwargs[unit] = getattr(self, unit)
        kwargs[thing] = value
        self.datetime = datetime.datetime(**kwargs)
432392
async def set(self, key, value):
        
        if not check_dht_value_type(value):
            raise TypeError(
                "Value must be of type int, float, bool, str, or bytes"
            )
        log.info("setting '%s' = '%s' on network", key, value)
        dkey = digest(key)
        return await self.set_digest(dkey, value)
845159
def store(self, key, value):
        
        self.client.set(key, value, time=self.timeout)
463883
def expireat(self, key, timestamp):
        
        if isinstance(timestamp, float):
            return self.pexpireat(key, int(timestamp * 1000))
        if not isinstance(timestamp, int):
            raise TypeError("timestamp argument must be int, not {!r}"
                            .format(timestamp))
        fut = self.execute(b'EXPIREAT', key, timestamp)
        return wait_convert(fut, bool)
445359
def __set_interval(self, value):
        '''
        
        '''
        if not isinstance(self, Interval):
            raise ValueError("'value' must be of type Interval")

        self.__interval = value
997473
def expiry_date(self, value):
        
        if value:
            self._expiry_date = parse(value).date() if isinstance(value, type_check) else value
270081
public Long pexpire(Object key, long milliseconds) {
		Jedis jedis = getJedis();
		try {
			return jedis.pexpire(keyToBytes(key), milliseconds);
		}
		finally {close(jedis);}
	}
581580
def safe_int(value):
    
    try:
        result = int(value)
        if result < 0:
            raise NegativeDurationError(
                'Negative values in duration strings are not allowed!'
            )
    except NegativeDurationError as exc:
        raise exc
    except (TypeError, ValueError):
        result = 0
    return result
792620
def expire_at(time)
      time = (time.to_f * 1000).floor
      return coerce_bool(self.connection.pexpireat(@key, time))
    end
52432
def setrange(self, key, offset, value):
        
        if not isinstance(offset, int):
            raise TypeError("offset argument must be int")
        if offset < 0:
            raise ValueError("offset must be greater equal 0")
        return self.execute(b'SETRANGE', key, offset, value)