def putAttributes(self, domain, item_name, attributes, replace=None):
        """
        Put attributes into domain at item_name.
       
        **Arguments:**
         * *domain* -- Domain name
         * *item_name* -- Item name
         * *attributes* -- Dictionary of attributes
       
        **Keyword arguments:**
         * *replace* -- List of attributes that should be overwritten
           (Default empty list)
        """
        if replace is None:
            replace = []
        if not isinstance(replace, list):
            raise Exception("Replace argument must be a list.")
        if not isinstance(attributes, dict):
            raise Exception("Attributes argument must be a dictionary.")
        parameters = {}
        parameters["Action"] = "PutAttributes"
        parameters["DomainName"] = domain
        parameters["ItemName"] = item_name
        attributes_list = []
        for attribute in attributes.items():
            # If the attribute is a list, split into multiple attributes.
            if isinstance(attribute[1], list):
                for value in attribute[1]:
                    attributes_list.append((attribute[0], value))
            else:
                attributes_list.append(attribute)
        i = 0
        for attribute in attributes_list:
            parameters["Attribute.%s.Name" % i] = attribute[0]
            parameters["Attribute.%s.Value" % i] = attribute[1]
            if attribute[0] in replace:
                parameters["Attribute.%s.Replace" % i] = "true"
            i += 1
        d = self._request(parameters)
        d.addCallback(self._putAttributesCallback, domain, item_name, attributes)
        d.addErrback(self._genericErrback)
        return d
dataset/ETHPy150Open wehriam/awspider/awspider/aws/sdb.py/AmazonSDB.putAttributes/original