Home / File/ _beta_runner.py — anthropic-sdk-python Source File

_beta_runner.py — anthropic-sdk-python Source File

Architecture documentation for _beta_runner.py, a python file in the anthropic-sdk-python codebase. 22 imports, 1 dependents.

File python ExtensibilityTools ToolRunner 22 imports 1 dependents 1 functions 8 classes

Entity Profile

Dependency Diagram

graph LR
  34260b96_4096_ba59_bee2_0b2a94476dcc["_beta_runner.py"]
  b54611d9_42e9_bc1f_164d_e76b1fe616c8["_types"]
  34260b96_4096_ba59_bee2_0b2a94476dcc --> b54611d9_42e9_bc1f_164d_e76b1fe616c8
  08dfe5f2_3d50_6472_c8d8_ddc0407d1229["_utils"]
  34260b96_4096_ba59_bee2_0b2a94476dcc --> 08dfe5f2_3d50_6472_c8d8_ddc0407d1229
  a7a22ac1_2fc9_eecb_0faf_2daedac42d29["types.beta"]
  34260b96_4096_ba59_bee2_0b2a94476dcc --> a7a22ac1_2fc9_eecb_0faf_2daedac42d29
  2f4a4b61_2541_5c7b_c70e_93f4b752f987["_beta_functions.py"]
  34260b96_4096_ba59_bee2_0b2a94476dcc --> 2f4a4b61_2541_5c7b_c70e_93f4b752f987
  60a3b209_180b_0680_57e3_9ebdfc101d6b["BetaFunctionTool"]
  34260b96_4096_ba59_bee2_0b2a94476dcc --> 60a3b209_180b_0680_57e3_9ebdfc101d6b
  67951991_8e94_eb92_6283_43e8d4a4c89f["BetaAsyncFunctionTool"]
  34260b96_4096_ba59_bee2_0b2a94476dcc --> 67951991_8e94_eb92_6283_43e8d4a4c89f
  6f841778_0364_167a_4fa4_ad1b5aa754ea["BetaBuiltinFunctionTool"]
  34260b96_4096_ba59_bee2_0b2a94476dcc --> 6f841778_0364_167a_4fa4_ad1b5aa754ea
  a076b136_74cf_8d21_4bad_0286750910e3["BetaAsyncBuiltinFunctionTool"]
  34260b96_4096_ba59_bee2_0b2a94476dcc --> a076b136_74cf_8d21_4bad_0286750910e3
  af98aab0_f1fc_18e5_6340_25ca580ef0d0["_beta_compaction_control.py"]
  34260b96_4096_ba59_bee2_0b2a94476dcc --> af98aab0_f1fc_18e5_6340_25ca580ef0d0
  2aaf0253_b31f_0636_fbc1_eac8017be6f5["CompactionControl"]
  34260b96_4096_ba59_bee2_0b2a94476dcc --> 2aaf0253_b31f_0636_fbc1_eac8017be6f5
  6f2946e9_da5a_bb4f_791a_ef00b3e23743["streaming._beta_messages"]
  34260b96_4096_ba59_bee2_0b2a94476dcc --> 6f2946e9_da5a_bb4f_791a_ef00b3e23743
  9c3b0212_b382_b33f_8f07_064f50178d15["types.beta.parsed_beta_message"]
  34260b96_4096_ba59_bee2_0b2a94476dcc --> 9c3b0212_b382_b33f_8f07_064f50178d15
  0bf69cd1_6c12_ada6_d22b_c0626c407d66["types.beta.message_create_params"]
  34260b96_4096_ba59_bee2_0b2a94476dcc --> 0bf69cd1_6c12_ada6_d22b_c0626c407d66
  bf95f492_9e39_85c6_d89b_f710d0271de7["types.beta.beta_tool_result_block_param"]
  34260b96_4096_ba59_bee2_0b2a94476dcc --> bf95f492_9e39_85c6_d89b_f710d0271de7
  style 34260b96_4096_ba59_bee2_0b2a94476dcc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

from __future__ import annotations

import logging
import warnings
from abc import ABC, abstractmethod
from typing import (
    TYPE_CHECKING,
    Any,
    List,
    Union,
    Generic,
    TypeVar,
    Callable,
    Iterable,
    Iterator,
    Coroutine,
    AsyncIterator,
)
from contextlib import contextmanager, asynccontextmanager
from typing_extensions import TypedDict, override

import httpx

from ..._types import Body, Query, Headers, NotGiven
from ..._utils import consume_sync_iterator, consume_async_iterator
from ...types.beta import BetaMessage, BetaMessageParam
from ._beta_functions import (
    BetaFunctionTool,
    BetaRunnableTool,
    BetaAsyncFunctionTool,
    BetaAsyncRunnableTool,
    BetaBuiltinFunctionTool,
    BetaAsyncBuiltinFunctionTool,
)
from ._beta_compaction_control import DEFAULT_THRESHOLD, DEFAULT_SUMMARY_PROMPT, CompactionControl
from ..streaming._beta_messages import BetaMessageStream, BetaAsyncMessageStream
from ...types.beta.parsed_beta_message import ResponseFormatT, ParsedBetaMessage, ParsedBetaContentBlock
from ...types.beta.message_create_params import ParseMessageCreateParamsBase
from ...types.beta.beta_tool_result_block_param import BetaToolResultBlockParam

if TYPE_CHECKING:
    from ..._client import Anthropic, AsyncAnthropic


AnyFunctionToolT = TypeVar(
    "AnyFunctionToolT",
    bound=Union[
        BetaFunctionTool[Any], BetaAsyncFunctionTool[Any], BetaBuiltinFunctionTool, BetaAsyncBuiltinFunctionTool
    ],
)
RunnerItemT = TypeVar("RunnerItemT")

log = logging.getLogger(__name__)


class RequestOptions(TypedDict, total=False):
    extra_headers: Headers | None
    extra_query: Query | None
    extra_body: Body | None
    timeout: float | httpx.Timeout | None | NotGiven
// ... (557 more lines)

Subdomains

Functions

Dependencies

Frequently Asked Questions

What does _beta_runner.py do?
_beta_runner.py is a source file in the anthropic-sdk-python codebase, written in python. It belongs to the ExtensibilityTools domain, ToolRunner subdomain.
What functions are defined in _beta_runner.py?
_beta_runner.py defines 1 function(s): _client.
What does _beta_runner.py depend on?
_beta_runner.py imports 22 module(s): BetaAsyncBuiltinFunctionTool, BetaAsyncFunctionTool, BetaBuiltinFunctionTool, BetaFunctionTool, CompactionControl, _beta_compaction_control.py, _beta_functions.py, _client, and 14 more.
What files import _beta_runner.py?
_beta_runner.py is imported by 1 file(s): __init__.py.
Where is _beta_runner.py in the architecture?
_beta_runner.py is located at src/anthropic/lib/tools/_beta_runner.py (domain: ExtensibilityTools, subdomain: ToolRunner, directory: src/anthropic/lib/tools).

Analyze Your Own Codebase

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

Try Supermodel Free