(  # type: ignore[no-any-unimported]
			self,
			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 = {},  # type: ignore[assignment]  # False positive
			timeout: http.timeout_t = 120,
			
			username: ty.Optional[str] = DEFAULT_USERNAME,
			password: ty.Optional[str] = DEFAULT_PASSWORD
	)
Arguments
		---------
		addr
			The `Multiaddr <dweb:/ipns/multiformats.io/multiaddr/>`_ describing the
			API daemon location, as used in the *API* key of `go-ipfs Addresses
			section
			<https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#addresses>`_
			
			Supported addressing patterns are currently:
			
			 * ``/{dns,dns4,dns6,ip4,ip6}/<host>/tcp/<port>`` (HTTP)
			 * ``/{dns,dns4,dns6,ip4,ip6}/<host>/tcp/<port>/http`` (HTTP)
			 * ``/{dns,dns4,dns6,ip4,ip6}/<host>/tcp/<port>/https`` (HTTPS)
			
			Additional forms (proxying) may be supported in the future.
		base
			The HTTP URL path prefix (or “base”) at which the API is exposed on the
			API daemon
		chunk_size
			The size of data chunks passed to the operating system when uploading
			files or text/binary content
		offline
			Ask daemon to operate in “offline mode” – that is, it should not consult
			the network when unable to find resources locally, but fail instead
		session
			Create this :class:`~ipfshttpclient.Client` instance with a session
			already open? (Useful for long-running client objects.)
		auth
			HTTP basic authentication `(username, password)` tuple to send along with
			each request to the API daemon
		cookies
			HTTP cookies to send along with each request to the API daemon
		headers
			Custom HTTP headers to send along with each request to the API daemon
		timeout
			Connection timeout (in seconds) when connecting to the API daemon
			
			If a tuple is passed its contents will be interpreted as the values for
			the connecting and receiving phases respectively, otherwise the value will
			apply to both phases.
			
			The default value is implementation-defined. A value of `math.inf`
			disables the respective timeout.
Arguments
		---------
		addr
			The `Multiaddr <dweb:/ipns/multiformats.io/multiaddr/>`_ describing the
			API daemon location, as used in the *API* key of `go-ipfs Addresses
			section
			<https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#addresses>`_
			
			Supported addressing patterns are currently:
			
			 * ``/{dns,dns4,dns6,ip4,ip6}/<host>/tcp/<port>`` (HTTP)
			 * ``/{dns,dns4,dns6,ip4,ip6}/<host>/tcp/<port>/http`` (HTTP)
			 * ``/{dns,dns4,dns6,ip4,ip6}/<host>/tcp/<port>/https`` (HTTPS)
			
			Additional forms (proxying) may be supported in the future.
		base
			The HTTP URL path prefix (or “base”) at which the API is exposed on the
			API daemon
		chunk_size
			The size of data chunks passed to the operating system when uploading
			files or text/binary content
		offline
			Ask daemon to operate in “offline mode” – that is, it should not consult
			the network when unable to find resources locally, but fail instead
		session
			Create this :class:`~ipfshttpclient.Client` instance with a session
			already open? (Useful for long-running client objects.)
		auth
			HTTP basic authentication `(username, password)` tuple to send along with
			each request to the API daemon
		cookies
			HTTP cookies to send along with each request to the API daemon
		headers
			Custom HTTP headers to send along with each request to the API daemon
		timeout
			Connection timeout (in seconds) when connecting to the API daemon
			
			If a tuple is passed its contents will be interpreted as the values for
			the connecting and receiving phases respectively, otherwise the value will
			apply to both phases.
			
			The default value is implementation-defined. A value of `math.inf`
			disables the respective timeout.
Arguments --------- addr The Multiaddr <dweb : / ipns / multiformats . io / multiaddr / > _ describing the API daemon location as used in the * API * key of go - ipfs Addresses section <https : // github . com / ipfs / go - ipfs / blob / master / docs / config . md#addresses > _ Supported addressing patterns are currently : * / { dns dns4 dns6 ip4 ip6 } / <host > / tcp / <port > ( HTTP ) * / { dns dns4 dns6 ip4 ip6 } / <host > / tcp / <port > / http ( HTTP ) * / { dns dns4 dns6 ip4 ip6 } / <host > / tcp / <port > / https ( HTTPS ) Additional forms ( proxying ) may be supported in the future . base The HTTP URL path prefix ( or “base” ) at which the API is exposed on the API daemon chunk_size The size of data chunks passed to the operating system when uploading files or text / binary content offline Ask daemon to operate in “offline mode” – that is it should not consult the network when unable to find resources locally but fail instead session Create this : class : ~ipfshttpclient . Client instance with a session already open? ( Useful for long - running client objects . ) auth HTTP basic authentication ( username password ) tuple to send along with each request to the API daemon cookies HTTP cookies to send along with each request to the API daemon headers Custom HTTP headers to send along with each request to the API daemon timeout Connection timeout ( in seconds ) when connecting to the API daemon If a tuple is passed its contents will be interpreted as the values for the connecting and receiving phases respectively otherwise the value will apply to both phases . The default value is implementation - defined . A value of math . inf disables the respective timeout .
def __init__(  # type: ignore[no-any-unimported]
			self,
			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 = {},  # type: ignore[assignment]  # False positive
			timeout: http.timeout_t = 120,
			
			username: ty.Optional[str] = DEFAULT_USERNAME,
			password: ty.Optional[str] = DEFAULT_PASSWORD
	):
		"""
		Arguments
		---------
		addr
			The `Multiaddr <dweb:/ipns/multiformats.io/multiaddr/>`_ describing the
			API daemon location, as used in the *API* key of `go-ipfs Addresses
			section
			<https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#addresses>`_
			
			Supported addressing patterns are currently:
			
			 * ``/{dns,dns4,dns6,ip4,ip6}/<host>/tcp/<port>`` (HTTP)
			 * ``/{dns,dns4,dns6,ip4,ip6}/<host>/tcp/<port>/http`` (HTTP)
			 * ``/{dns,dns4,dns6,ip4,ip6}/<host>/tcp/<port>/https`` (HTTPS)
			
			Additional forms (proxying) may be supported in the future.
		base
			The HTTP URL path prefix (or “base”) at which the API is exposed on the
			API daemon
		chunk_size
			The size of data chunks passed to the operating system when uploading
			files or text/binary content
		offline
			Ask daemon to operate in “offline mode” – that is, it should not consult
			the network when unable to find resources locally, but fail instead
		session
			Create this :class:`~ipfshttpclient.Client` instance with a session
			already open? (Useful for long-running client objects.)
		auth
			HTTP basic authentication `(username, password)` tuple to send along with
			each request to the API daemon
		cookies
			HTTP cookies to send along with each request to the API daemon
		headers
			Custom HTTP headers to send along with each request to the API daemon
		timeout
			Connection timeout (in seconds) when connecting to the API daemon
			
			If a tuple is passed its contents will be interpreted as the values for
			the connecting and receiving phases respectively, otherwise the value will
			apply to both phases.
			
			The default value is implementation-defined. A value of `math.inf`
			disables the respective timeout.
		"""
		
		self.chunk_size = chunk_size
		
		if auth is None and (username or password):
			assert username and password
			auth = (username, password)
		
		self._client = http.build_client_sync(
			addr=addr,
			base=base,
			offline=offline,
			auth=auth,
			cookies=cookies,
			headers=headers,
			timeout=timeout
		)

		if session:
			self._client.open_session()
		
		self._workarounds = self._client.workarounds
def __init__ ( # type: ignore[no-any-unimported] self , 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 = { } , # type: ignore[assignment]  # False positive timeout : http . timeout_t = 120 , username : ty . Optional [ str ] = DEFAULT_USERNAME , password : ty . Optional [ str ] = DEFAULT_PASSWORD ) : self . chunk_size = chunk_size if auth is None and ( username or password ) : assert username and password auth = ( username , password ) self . _client = http . build_client_sync ( addr = addr , base = base , offline = offline , auth = auth , cookies = cookies , headers = headers , timeout = timeout ) if session : self . _client . open_session ( ) self . _workarounds = self . _client . workarounds