MCPcopy
hub / github.com/anthropics/anthropic-sdk-python / close

Method close

src/anthropic/_base_client.py:1043–1051  ·  view source on GitHub ↗

Close the underlying HTTPX client. The client will *not* be usable after this.

(self)

Source from the content-addressed store, hash-verified

1041 return self._client.is_closed
1042
1043 def close(self) -> None:
1044 """Close the underlying HTTPX client.
1045
1046 The client will *not* be usable after this.
1047 """
1048 # If an error is thrown while constructing a client, self._client
1049 # may not be present
1050 if hasattr(self, "_client"):
1051 self._client.close()
1052
1053 def __enter__(self: _T) -> _T:
1054 return self

Callers 3

__exit__Method · 0.95
__del__Method · 0.45
requestMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected