async def set(self, key, value, *, flags=None):
        """Sets the key to the given value.

        Parameters:
            key (str): Key to set
            value (Payload): Value to set, It will be encoded by flags
            flags (int): Flags to set with value
        Returns:
            bool: ``True`` on success
        """
        value = encode_value(value, flags)
        response = await self._write(key, value, flags=flags)
        return response.body is True