Home / Function/ close() — anthropic-sdk-python Function Reference

close() — anthropic-sdk-python Function Reference

Architecture documentation for the close() function in _base_client.py from the anthropic-sdk-python codebase.

Function python AnthropicClient SyncAPI calls 2 called by 2

Entity Profile

Dependency Diagram

graph TD
  0e13a01b_fec2_4139_7de2_ed2a384e3e75["close()"]
  3224f719_8046_78c8_59e1_47301a46ddd4["AsyncAPIClient"]
  0e13a01b_fec2_4139_7de2_ed2a384e3e75 -->|defined in| 3224f719_8046_78c8_59e1_47301a46ddd4
  68646c0e_7a37_2971_5977_d7bb4119303e["close()"]
  68646c0e_7a37_2971_5977_d7bb4119303e -->|calls| 0e13a01b_fec2_4139_7de2_ed2a384e3e75
  e9c72be3_f691_b4fb_8696_ff3512ad5832["__aexit__()"]
  e9c72be3_f691_b4fb_8696_ff3512ad5832 -->|calls| 0e13a01b_fec2_4139_7de2_ed2a384e3e75
  68646c0e_7a37_2971_5977_d7bb4119303e["close()"]
  0e13a01b_fec2_4139_7de2_ed2a384e3e75 -->|calls| 68646c0e_7a37_2971_5977_d7bb4119303e
  9b04cf68_c305_6931_ad0f_dca9ae0be3d6["aclose()"]
  0e13a01b_fec2_4139_7de2_ed2a384e3e75 -->|calls| 9b04cf68_c305_6931_ad0f_dca9ae0be3d6
  style 0e13a01b_fec2_4139_7de2_ed2a384e3e75 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/anthropic/_base_client.py lines 1601–1606

    async def close(self) -> None:
        """Close the underlying HTTPX client.

        The client will *not* be usable after this.
        """
        await self._client.aclose()

Subdomains

Called By

Frequently Asked Questions

What does close() do?
close() is a function in the anthropic-sdk-python codebase, defined in src/anthropic/_base_client.py.
Where is close() defined?
close() is defined in src/anthropic/_base_client.py at line 1601.
What does close() call?
close() calls 2 function(s): aclose, close.
What calls close()?
close() is called by 2 function(s): __aexit__, close.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free