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

_get_open_connections() — anthropic-sdk-python Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  1555a14d_ad31_ef11_8c05_4240241d1d97["_get_open_connections()"]
  9e5c097c_ec73_f29f_5858_a29a8c31dd98["test_client.py"]
  1555a14d_ad31_ef11_8c05_4240241d1d97 -->|defined in| 9e5c097c_ec73_f29f_5858_a29a8c31dd98
  ad041f22_e636_0478_448a_2c9d549ef106["test_retrying_timeout_errors_doesnt_leak()"]
  ad041f22_e636_0478_448a_2c9d549ef106 -->|calls| 1555a14d_ad31_ef11_8c05_4240241d1d97
  356c4fe8_6fde_02c8_19ba_3ed89fe7bc9f["test_retrying_status_errors_doesnt_leak()"]
  356c4fe8_6fde_02c8_19ba_3ed89fe7bc9f -->|calls| 1555a14d_ad31_ef11_8c05_4240241d1d97
  25054da4_816c_4fb6_7cdb_ff275927e64a["test_retrying_timeout_errors_doesnt_leak()"]
  25054da4_816c_4fb6_7cdb_ff275927e64a -->|calls| 1555a14d_ad31_ef11_8c05_4240241d1d97
  c81f470a_bfec_1ed9_415a_79cf5c2181e1["test_retrying_status_errors_doesnt_leak()"]
  c81f470a_bfec_1ed9_415a_79cf5c2181e1 -->|calls| 1555a14d_ad31_ef11_8c05_4240241d1d97
  style 1555a14d_ad31_ef11_8c05_4240241d1d97 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_client.py lines 107–112

def _get_open_connections(client: Anthropic | AsyncAnthropic) -> int:
    transport = client._client._transport
    assert isinstance(transport, httpx.HTTPTransport) or isinstance(transport, httpx.AsyncHTTPTransport)

    pool = transport._pool
    return len(pool._requests)

Subdomains

Frequently Asked Questions

What does _get_open_connections() do?
_get_open_connections() is a function in the anthropic-sdk-python codebase, defined in tests/test_client.py.
Where is _get_open_connections() defined?
_get_open_connections() is defined in tests/test_client.py at line 107.
What calls _get_open_connections()?
_get_open_connections() is called by 4 function(s): test_retrying_status_errors_doesnt_leak, test_retrying_status_errors_doesnt_leak, test_retrying_timeout_errors_doesnt_leak, test_retrying_timeout_errors_doesnt_leak.

Analyze Your Own Codebase

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

Try Supermodel Free