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

_handle_request() — anthropic-sdk-python Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  5458a066_13b4_b825_65a6_467eb0fe9832["_handle_request()"]
  9011b04b_5924_8fe3_a45f_ff5613213f13["BetaStreamingToolRunner"]
  5458a066_13b4_b825_65a6_467eb0fe9832 -->|defined in| 9011b04b_5924_8fe3_a45f_ff5613213f13
  947ff695_bb6a_d258_a971_760cc41d22a6["_handle_request()"]
  947ff695_bb6a_d258_a971_760cc41d22a6 -->|calls| 5458a066_13b4_b825_65a6_467eb0fe9832
  bf19fd7b_bb27_c131_348c_62b02ddbafba["_handle_request()"]
  bf19fd7b_bb27_c131_348c_62b02ddbafba -->|calls| 5458a066_13b4_b825_65a6_467eb0fe9832
  712d331d_ba35_e8d6_7cf7_eeb56a57420d["_handle_request()"]
  712d331d_ba35_e8d6_7cf7_eeb56a57420d -->|calls| 5458a066_13b4_b825_65a6_467eb0fe9832
  947ff695_bb6a_d258_a971_760cc41d22a6["_handle_request()"]
  5458a066_13b4_b825_65a6_467eb0fe9832 -->|calls| 947ff695_bb6a_d258_a971_760cc41d22a6
  style 5458a066_13b4_b825_65a6_467eb0fe9832 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/anthropic/lib/tools/_beta_runner.py lines 361–364

    def _handle_request(self) -> Iterator[BetaMessageStream[ResponseFormatT]]:
        with self._client.beta.messages.stream(**self._params, **self._options) as stream:
            self._last_message = stream.get_final_message
            yield stream

Subdomains

Frequently Asked Questions

What does _handle_request() do?
_handle_request() is a function in the anthropic-sdk-python codebase, defined in src/anthropic/lib/tools/_beta_runner.py.
Where is _handle_request() defined?
_handle_request() is defined in src/anthropic/lib/tools/_beta_runner.py at line 361.
What does _handle_request() call?
_handle_request() calls 1 function(s): _handle_request.
What calls _handle_request()?
_handle_request() is called by 3 function(s): _handle_request, _handle_request, _handle_request.

Analyze Your Own Codebase

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

Try Supermodel Free