(self, root: base.cid_t, data: utils.clean_file_t,
	             **kwargs: base.CommonArgs)
return self._client.request('/object/patch/set-data', args, decoder='json', data=body,
		                            headers=headers, **kwargs)
Creates a new merkledag object based on an existing one
		
		The new object will have the same links as the old object but
		with the provided data instead of the old object's data contents.
		
		.. code-block:: python
		
			>>> client.object.patch.set_data(
			...     'QmNtXbF3AjAk59gQKRgEdVabHcSsiPUnJwHnZKyj2x8Z3k',
			...     io.BytesIO(b'bla')
			... )
			{'Hash': 'QmSw3k2qkv4ZPsbu9DVEJaTMszAQWNgM1FTFYpfZeNQWrd'}
		
		Parameters
		----------
		root
			IPFS hash of the object to modify
		data
			The new data to store in root
		
		Returns
		-------
			dict
		
		+------+----------------------------------+
		| Hash | Hash of the newly derived object |
		+------+----------------------------------+
Creates a new merkledag object based on an existing one
		
		The new object will have the same links as the old object but
		with the provided data instead of the old object's data contents.
		
		.. code-block:: python
		
			>>> client.object.patch.set_data(
			...     'QmNtXbF3AjAk59gQKRgEdVabHcSsiPUnJwHnZKyj2x8Z3k',
			...     io.BytesIO(b'bla')
			... )
			{'Hash': 'QmSw3k2qkv4ZPsbu9DVEJaTMszAQWNgM1FTFYpfZeNQWrd'}
		
		Parameters
		----------
		root
			IPFS hash of the object to modify
		data
			The new data to store in root
		
		Returns
		-------
			dict
		
		+------+----------------------------------+
		| Hash | Hash of the newly derived object |
		+------+----------------------------------+
Creates a new merkledag object based on an existing one The new object will have the same links as the old object but with the provided data instead of the old object s data contents . .. code - block :: python >>> client . object . patch . set_data ( ... QmNtXbF3AjAk59gQKRgEdVabHcSsiPUnJwHnZKyj2x8Z3k ... io . BytesIO ( b bla ) ... ) { Hash : QmSw3k2qkv4ZPsbu9DVEJaTMszAQWNgM1FTFYpfZeNQWrd } Parameters ---------- root IPFS hash of the object to modify data The new data to store in root Returns ------- dict + ------ + ---------------------------------- + | Hash | Hash of the newly derived object | + ------ + ---------------------------------- +
def set_data(self, root: base.cid_t, data: utils.clean_file_t,
	             **kwargs: base.CommonArgs):
		"""Creates a new merkledag object based on an existing one
		
		The new object will have the same links as the old object but
		with the provided data instead of the old object's data contents.
		
		.. code-block:: python
		
			>>> client.object.patch.set_data(
			...     'QmNtXbF3AjAk59gQKRgEdVabHcSsiPUnJwHnZKyj2x8Z3k',
			...     io.BytesIO(b'bla')
			... )
			{'Hash': 'QmSw3k2qkv4ZPsbu9DVEJaTMszAQWNgM1FTFYpfZeNQWrd'}
		
		Parameters
		----------
		root
			IPFS hash of the object to modify
		data
			The new data to store in root
		
		Returns
		-------
			dict
		
		+------+----------------------------------+
		| Hash | Hash of the newly derived object |
		+------+----------------------------------+
		"""
		args = (str(root),)
		body, headers = multipart.stream_files(data, chunk_size=self.chunk_size)
		return self._client.request('/object/patch/set-data', args, decoder='json', data=body,
		                            headers=headers, **kwargs)
def set_data ( self , root : base . cid_t , data : utils . clean_file_t , * * kwargs : base . CommonArgs ) : args = ( str ( root ) , ) body , headers = multipart . stream_files ( data , chunk_size = self . chunk_size ) return self . _client . request ( '/object/patch/set-data' , args , decoder = 'json' , data = body , headers = headers , * * kwargs )