def put(self, resource_id, params=None):
        """
        Update an existing resource.

        Required Arguments:

            resource_id
                The id of the resource to update.

            params
                A dictionary of parameters (different for every resource).

        """
        if params is None:
            params = {} # pragma: no cover

        params = self.filter(params)
        path = '/%s/%s' % (self.path, resource_id)

        try:
            response = self.api.make_request('PUT', path, params)
        except exc.dRestRequestError as e:
            msg = "%s (resource: %s, id: %s)" % (e.msg, self.name,
                                                 resource_id)
            raise exc.dRestRequestError(msg, e.response)

        return response
dataset/ETHPy150Open datafolklabs/drest/drest/resource.py/RESTResourceHandler.put/original