(
		addr: http.addr_t = DEFAULT_ADDR,
		base: str = DEFAULT_BASE, *,
		
		chunk_size: int = multipart.default_chunk_size,
		offline: bool = False,
		session: bool = False,
		
		auth: http.auth_t = None,
		cookies: http.cookies_t = None,
		headers: http.headers_t = {},
		timeout: http.timeout_t = 120,
		
		username: ty.Optional[str] = DEFAULT_USERNAME,
		password: ty.Optional[str] = DEFAULT_PASSWORD
)
return client
Create a new :class:`~ipfshttpclient.Client` instance and connect to the
	daemon to validate that its version is supported as well as applying any
	known workarounds for the given daemon version
	
	Raises
	------
		~ipfshttpclient.exceptions.ErrorResponse
		~ipfshttpclient.exceptions.ConnectionError
		~ipfshttpclient.exceptions.ProtocolError
		~ipfshttpclient.exceptions.StatusError
		~ipfshttpclient.exceptions.TimeoutError
	
	All parameters are identical to those passed to the constructor of the
	:class:`~ipfshttpclient.Client` class.
Create a new :class:`~ipfshttpclient.Client` instance and connect to the
	daemon to validate that its version is supported as well as applying any
	known workarounds for the given daemon version
	
	Raises
	------
		~ipfshttpclient.exceptions.ErrorResponse
		~ipfshttpclient.exceptions.ConnectionError
		~ipfshttpclient.exceptions.ProtocolError
		~ipfshttpclient.exceptions.StatusError
		~ipfshttpclient.exceptions.TimeoutError
	
	All parameters are identical to those passed to the constructor of the
	:class:`~ipfshttpclient.Client` class.
Create a new : class : ~ipfshttpclient . Client instance and connect to the daemon to validate that its version is supported as well as applying any known workarounds for the given daemon version Raises ------ ~ipfshttpclient . exceptions . ErrorResponse ~ipfshttpclient . exceptions . ConnectionError ~ipfshttpclient . exceptions . ProtocolError ~ipfshttpclient . exceptions . StatusError ~ipfshttpclient . exceptions . TimeoutError All parameters are identical to those passed to the constructor of the : class : ~ipfshttpclient . Client class .
def connect(
		addr: http.addr_t = DEFAULT_ADDR,
		base: str = DEFAULT_BASE, *,
		
		chunk_size: int = multipart.default_chunk_size,
		offline: bool = False,
		session: bool = False,
		
		auth: http.auth_t = None,
		cookies: http.cookies_t = None,
		headers: http.headers_t = {},
		timeout: http.timeout_t = 120,
		
		username: ty.Optional[str] = DEFAULT_USERNAME,
		password: ty.Optional[str] = DEFAULT_PASSWORD
):
	"""Create a new :class:`~ipfshttpclient.Client` instance and connect to the
	daemon to validate that its version is supported as well as applying any
	known workarounds for the given daemon version
	
	Raises
	------
		~ipfshttpclient.exceptions.ErrorResponse
		~ipfshttpclient.exceptions.ConnectionError
		~ipfshttpclient.exceptions.ProtocolError
		~ipfshttpclient.exceptions.StatusError
		~ipfshttpclient.exceptions.TimeoutError
	
	All parameters are identical to those passed to the constructor of the
	:class:`~ipfshttpclient.Client` class.
	"""

	# Create client instance
	client = Client(
		addr, base,
		chunk_size=chunk_size, offline=offline, session=session,
		auth=auth, cookies=cookies, headers=headers, timeout=timeout,
		username=username, password=password,
	)
	
	# Query version number from daemon and validate it
	assert_version(client.apply_workarounds()["Version"])
	
	return client
def connect ( addr : http . addr_t = DEFAULT_ADDR , base : str = DEFAULT_BASE , * , chunk_size : int = multipart . default_chunk_size , offline : bool = False , session : bool = False , auth : http . auth_t = None , cookies : http . cookies_t = None , headers : http . headers_t = { } , timeout : http . timeout_t = 120 , username : ty . Optional [ str ] = DEFAULT_USERNAME , password : ty . Optional [ str ] = DEFAULT_PASSWORD ) : # Create client instance client = Client ( addr , base , chunk_size = chunk_size , offline = offline , session = session , auth = auth , cookies = cookies , headers = headers , timeout = timeout , username = username , password = password , ) # Query version number from daemon and validate it assert_version ( client . apply_workarounds ( ) [ "Version" ] ) return client