(self, peer_id: str, *peer_ids: str, **kwargs: base.CommonArgs)
return self._client.request('/dht/query', args, decoder='json', **kwargs)
Finds the closest Peer IDs to a given Peer ID by querying the DHT.
		
		.. code-block:: python
		
			>>> client.dht.query("/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDM … uvuJ")
			[{'ID': 'QmPkFbxAQ7DeKD5VGSh9HQrdS574pyNzDmxJeGrRJxoucF',
			  'Extra': '', 'Type': 2, 'Responses': None},
			 {'ID': 'QmR1MhHVLJSLt9ZthsNNhudb1ny1WdhY4FPW21ZYFWec4f',
			  'Extra': '', 'Type': 2, 'Responses': None},
			 {'ID': 'Qmcwx1K5aVme45ab6NYWb52K2TFBeABgCLccC7ntUeDsAs',
			  'Extra': '', 'Type': 2, 'Responses': None},
			 …
			 {'ID': 'QmYYy8L3YD1nsF4xtt4xmsc14yqvAAnKksjo3F3iZs5jPv',
			  'Extra': '', 'Type': 1, 'Responses': []}]
		
		Parameters
		----------
		peer_id
			The peerID to run the query against
		
		Returns
		-------
			dict
				List of peers IDs
Finds the closest Peer IDs to a given Peer ID by querying the DHT.
		
		.. code-block:: python
		
			>>> client.dht.query("/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDM … uvuJ")
			[{'ID': 'QmPkFbxAQ7DeKD5VGSh9HQrdS574pyNzDmxJeGrRJxoucF',
			  'Extra': '', 'Type': 2, 'Responses': None},
			 {'ID': 'QmR1MhHVLJSLt9ZthsNNhudb1ny1WdhY4FPW21ZYFWec4f',
			  'Extra': '', 'Type': 2, 'Responses': None},
			 {'ID': 'Qmcwx1K5aVme45ab6NYWb52K2TFBeABgCLccC7ntUeDsAs',
			  'Extra': '', 'Type': 2, 'Responses': None},
			 …
			 {'ID': 'QmYYy8L3YD1nsF4xtt4xmsc14yqvAAnKksjo3F3iZs5jPv',
			  'Extra': '', 'Type': 1, 'Responses': []}]
		
		Parameters
		----------
		peer_id
			The peerID to run the query against
		
		Returns
		-------
			dict
				List of peers IDs
Finds the closest Peer IDs to a given Peer ID by querying the DHT . .. code - block :: python >>> client . dht . query ( / ip4 / 104 . 131 . 131 . 82 / tcp / 4001 / ipfs / QmaCpDM … uvuJ ) [ { ID : QmPkFbxAQ7DeKD5VGSh9HQrdS574pyNzDmxJeGrRJxoucF Extra : Type : 2 Responses : None } { ID : QmR1MhHVLJSLt9ZthsNNhudb1ny1WdhY4FPW21ZYFWec4f Extra : Type : 2 Responses : None } { ID : Qmcwx1K5aVme45ab6NYWb52K2TFBeABgCLccC7ntUeDsAs Extra : Type : 2 Responses : None } … { ID : QmYYy8L3YD1nsF4xtt4xmsc14yqvAAnKksjo3F3iZs5jPv Extra : Type : 1 Responses : [] } ] Parameters ---------- peer_id The peerID to run the query against Returns ------- dict List of peers IDs
def query(self, peer_id: str, *peer_ids: str, **kwargs: base.CommonArgs):
		"""Finds the closest Peer IDs to a given Peer ID by querying the DHT.
		
		.. code-block:: python
		
			>>> client.dht.query("/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDM … uvuJ")
			[{'ID': 'QmPkFbxAQ7DeKD5VGSh9HQrdS574pyNzDmxJeGrRJxoucF',
			  'Extra': '', 'Type': 2, 'Responses': None},
			 {'ID': 'QmR1MhHVLJSLt9ZthsNNhudb1ny1WdhY4FPW21ZYFWec4f',
			  'Extra': '', 'Type': 2, 'Responses': None},
			 {'ID': 'Qmcwx1K5aVme45ab6NYWb52K2TFBeABgCLccC7ntUeDsAs',
			  'Extra': '', 'Type': 2, 'Responses': None},
			 …
			 {'ID': 'QmYYy8L3YD1nsF4xtt4xmsc14yqvAAnKksjo3F3iZs5jPv',
			  'Extra': '', 'Type': 1, 'Responses': []}]
		
		Parameters
		----------
		peer_id
			The peerID to run the query against
		
		Returns
		-------
			dict
				List of peers IDs
		"""
		args = (peer_id,) + peer_ids
		return self._client.request('/dht/query', args, decoder='json', **kwargs)
def query ( self , peer_id : str , * peer_ids : str , * * kwargs : base . CommonArgs ) : args = ( peer_id , ) + peer_ids return self . _client . request ( '/dht/query' , args , decoder = 'json' , * * kwargs )