

def save(self):
    "Update the remote resource.\n\n        There are two ways to provide data to be saved:\n\n        1. Pass it as a dictionary to the ``update()`` method.\n        2. Modify the Element's attributes.\n\n        The data will be validated before the PUT request is made. After\n        a successful update an updated Element instance is returned.\n        "
    self.validate()
    resource = self.get_resource()
    request = requests.Request('PUT', self.get_url(), data=json.dumps(self.get_data()))
    response = resource.dispatch(request)
    return resource.collection.get_element(resource.validate(resource.extract(response))[0])

dataset/ETHPy150Open transcode-de/durga/durga/element.py Element.save/original