MCPcopy Create free account

hub / github.com/anthropics/anthropic-sdk-python / functions

Functions12,274 in github.com/anthropics/anthropic-sdk-python

↓ 3 callersFunctiontool_results
(message: BetaMessageParam | None)
tests/lib/tools/test_runner_eager_tools.py:873
↓ 3 callersFunctiontrace_headers
The headers that carry `span`'s trace context, from the propagator the application registered. Empty when the propagator cannot be loaded or fail
src/anthropic/_tracing.py:878
↓ 3 callersFunctionunion_members
The classes of a union, a list of them, or one class, however nested or annotated.
tests/test_open_telemetry.py:8235
↓ 3 callersFunctionurl_context
(record: CallRecord)
src/anthropic/lib/tools/_toolsets/_pipeline.py:302
↓ 3 callersMethodwait
(self, context: BetaToolsetCallContext, input: Any)
tests/lib/tools/toolsets/test_pipeline.py:1122
↓ 3 callersMethodwait_closed
An event loop closes what was dropped once it gets to run, and one generator after the other.
tests/utils.py:215
↓ 3 callersFunctionwrite_text_exact
Write a UTF-8 file without newline translation.
src/anthropic/lib/tools/_files.py:18
↓ 2 callersMethod__aenter__
(self)
src/anthropic/lib/tools/_file_store.py:129
↓ 2 callersMethod__aenter__
(self)
tests/lib/tools/test_session_runner.py:168
↓ 2 callersMethod__anext__
(self)
src/anthropic/lib/tools/_beta_runner.py:1162
↓ 2 callersMethod__class__
(self)
src/anthropic/_utils/_proxy.py:48
↓ 2 callersMethod__decode__
(self)
src/anthropic/_decoders/jsonl.py:50
↓ 2 callersMethod__enter__
(self)
src/anthropic/_streaming.py:132
↓ 2 callersMethod__exit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, tb: TracebackType | None
src/anthropic/lib/tools/_toolsets/_runnable.py:129
↓ 2 callersMethod__init__
( self, *, raw: httpx2.Response, cast_to: type[R], client: BaseClient[
src/anthropic/_response.py:63
↓ 2 callersMethod__init__
( self, *, resource: str | None = None, api_key: str | None = None, az
src/anthropic/lib/foundry.py:95
↓ 2 callersMethod__init__
(self)
tests/test_open_telemetry.py:142
↓ 2 callersMethod__init__
(self, *, sync: bool, runner: Any, timeline: list[str], requests: list[Any], desktop: Desktop)
tests/lib/tools/test_runner_eager_tools.py:1072
↓ 2 callersMethod__init__
(self)
tests/lib/tools/toolsets/_fakes.py:47
↓ 2 callersMethod__init__
(self)
tests/lib/tools/toolsets/_computer_fakes.py:36
↓ 2 callersMethod__stream__
(self)
src/anthropic/_streaming.py:82
↓ 2 callersMethod__stream__
(self)
tests/test_streaming.py:255
↓ 2 callersFunction_active_profile
Resolve the active profile name. `ANTHROPIC_PROFILE` env var → `<config_dir>/active_config` pointer file → `"default"` literal. The resolved
src/anthropic/lib/credentials/_constants.py:94
↓ 2 callersMethod_adopt_container
Continue in the container of `reply` on later turns, unless the thread already names one: container-bound server tools reject a follow-up requ
src/anthropic/lib/threads/_thread_state.py:332
↓ 2 callersFunction_append_header_value
Append `addition` to a comma-separated header value, skipping tokens that are already present so the same helper isn't recorded twice. Values
src/anthropic/_base_client.py:2773
↓ 2 callersMethod_append_tool_results
Add `results` right after the reply, where the API takes them, ahead of messages added to the thread while it was handled.
src/anthropic/lib/tools/_beta_runner.py:462
↓ 2 callersMethod_applicable_body
The request's JSON body when this middleware applies to it, `None` otherwise.
src/anthropic/lib/middleware/_fallbacks.py:344
↓ 2 callersMethod_apply
(self, request: httpx2.Request, token: str)
src/anthropic/lib/credentials/_auth.py:76
↓ 2 callersFunction_archive_top_dir
Return the single top-level directory shared by every archive entry, or `""` if the entries don't all live under one common directory. Skill
src/anthropic/lib/tools/_skills.py:63
↓ 2 callersFunction_assert_only_files_and_dirs
(root: Path)
tests/lib/tools/test_skills.py:137
↓ 2 callersFunction_assert_reply_params_are_left_off_the_compaction_request_only
( respx_mock: MockRouter, tool_choice: BetaToolChoiceParam, fallbacks: Union[List[BetaFallbackPara
tests/lib/tools/test_runners.py:3329
↓ 2 callersFunction_assert_tool_runner_calls
(calls: List[MockRequestCall])
tests/lib/test_vertex.py:137
↓ 2 callersFunction_assert_tool_runner_calls
(calls: t.List[MockRequestCall])
tests/lib/test_bedrock.py:765
↓ 2 callersFunction_async_atomic_write_file
(target_path: AsyncPath, content: str)
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:628
↓ 2 callersFunction_async_refusal
The same as `_refusal`, for a call on the async class.
tests/lib/tools/toolsets/test_refusals.py:37
↓ 2 callersFunction_async_validate_no_symlink_escape
(target_path: AsyncPath, memory_root: AsyncPath)
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:659
↓ 2 callersMethod_atomic_write_credentials
Atomic write to the credentials file (NOT the config file). `data` may hold `SecretStr` token values (see `_read_credentials`); they
src/anthropic/lib/credentials/_providers.py:458
↓ 2 callersFunction_atomic_write_file
(target_path: Path, content: str)
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:283
↓ 2 callersMethod_attempt_request
Prepare, build and send a single HTTP attempt. Returns the response regardless of its status code, along with the prepared options it
src/anthropic/_base_client.py:1409
↓ 2 callersMethod_attempt_request
Prepare, build and send a single HTTP attempt. Returns the response regardless of its status code, along with the prepared options it
src/anthropic/_base_client.py:2195
↓ 2 callersFunction_bind_credentials_base_url
Return the provider this client should exchange tokens through. See `BaseURLBoundProvider`; any other provider (plain callables, custom impls
src/anthropic/_client.py:69
↓ 2 callersMethod_build_middleware_chain
Build the middleware invocation chain. The chain only depends on the immutable `self._middleware` tuple so it is built once at constr
src/anthropic/_base_client.py:1345
↓ 2 callersMethod_build_middleware_chain
Build the middleware invocation chain. The chain only depends on the immutable `self._middleware` tuple so it is built once at constr
src/anthropic/_base_client.py:2127
↓ 2 callersFunction_check_message_threads_supported
(client: Anthropic | AsyncAnthropic)
src/anthropic/lib/threads/_beta_threads.py:564
↓ 2 callersMethod_check_size
(self, content: str)
tests/lib/tools/memory_sync/_fake_anthropic.py:136
↓ 2 callersFunction_check_sync_interval
(interval: float)
src/anthropic/lib/tools/_memories.py:55
↓ 2 callersMethod_compact
(self, compaction: BetaCompactionConfigParam)
src/anthropic/lib/tools/_beta_runner.py:665
↓ 2 callersMethod_compact
(self, compaction: BetaCompactionConfigParam)
src/anthropic/lib/tools/_beta_runner.py:1197
↓ 2 callersFunction_compacted_response_with_an_unmodelled_block
()
tests/lib/tools/test_runners.py:2498
↓ 2 callersFunction_compaction_response
()
tests/lib/tools/test_runners.py:795
↓ 2 callersFunction_compaction_then_forecast_responses
()
tests/lib/tools/test_runners.py:3324
↓ 2 callersFunction_config_file_path
Path to `<config_dir>/configs/<profile>.json` (non-secret, 0644).
src/anthropic/lib/credentials/_constants.py:175
↓ 2 callersFunction_config_with_its_own_host_and_workspace
(tmp_path: pathlib.Path)
tests/lib/test_scoped_client.py:160
↓ 2 callersMethod_create_with_recovery
(self, overrides: TurnOverrides, *, stream: Literal[False])
src/anthropic/lib/threads/_beta_threads.py:329
↓ 2 callersMethod_create_with_recovery
(self, overrides: TurnOverrides, *, stream: Literal[False])
src/anthropic/lib/threads/_beta_threads.py:542
↓ 2 callersFunction_credit_token
The refusal's minted credit token; only the beta surface carries one.
src/anthropic/lib/middleware/_fallbacks.py:1424
↓ 2 callersFunction_credit_token_param
The retry's `fallback_credit_token`, in the object form. `best_effort` keeps the retry serving even when redemption fails — a bare string wou
src/anthropic/lib/middleware/_fallbacks.py:55
↓ 2 callersFunction_declined_iteration_entries
The `usage.iterations` entries a declined hop contributes to the chain. The hop's refusal self-reports its iterations: adopt them, retyped to
src/anthropic/lib/middleware/_fallbacks.py:1232
↓ 2 callersFunction_default_bash_env
The default environment of the bash subprocess, and the environment of `rg`, with the runner's own credentials scrubbed. The bash tool runs m
src/anthropic/lib/tools/agent_toolset.py:148
↓ 2 callersFunction_default_worker_id
()
src/anthropic/lib/environments/_poller.py:77
↓ 2 callersFunction_echo
(name: str, input: object)
tests/lib/tools/toolsets/_stubs.py:26
↓ 2 callersMethod_end_failed_refresh
Release any waiters. Returns the stale token to serve if this was an advisory refresh, or `None` if the caller should re-raise `err`.
src/anthropic/lib/credentials/_cache.py:306
↓ 2 callersMethod_end_refresh
(self, fresh: AccessToken, refresh: Refresh[_EventT])
src/anthropic/lib/credentials/_cache.py:285
↓ 2 callersFunction_error_details
The `error.details` object of the response body, or an empty one when the body has none.
src/anthropic/lib/threads/_thread_state.py:609
↓ 2 callersFunction_eventstream_chunk_frame
Encode `payload` as one `chunk` event in AWS eventstream binary framing.
tests/lib/test_bedrock.py:579
↓ 2 callersFunction_eventstream_frame
(header_values: t.Mapping[str, str], body: bytes)
tests/lib/test_bedrock.py:587
↓ 2 callersFunction_expected_urls
(segments: tuple[str, str, str])
tests/lib/test_google_cloud.py:102
↓ 2 callersFunction_expects_response_wrapper
Whether the given `cast_to` asks for the `APIResponse` wrapper itself.
src/anthropic/_base_client.py:2852
↓ 2 callersMethod_fallback
(self, request: APIRequest)
tests/test_middleware.py:138
↓ 2 callersFunction_file_json
()
tests/lib/test_stainless_helpers.py:54
↓ 2 callersFunction_filenames_in_dir
Every regular file under `base` as `(rel_path, path)`; an absent `base` is empty, a present non-directory is refused.
src/anthropic/lib/tools/_file_store.py:365
↓ 2 callersFunction_forward_input_transformations
Copy `input_transformations` from a fallback's `message_start` that was not re-emitted onto the emitted `message_delta`, matching what a server-si
src/anthropic/lib/middleware/_fallbacks.py:1222
↓ 2 callersMethod_from_state
(cls, client: ClientT, state: ThreadState[RunnableToolT, ResponseFormatT])
src/anthropic/lib/threads/_beta_threads.py:64
↓ 2 callersFunction_from_unix_seconds
(seconds: Union[int, float])
src/anthropic/_utils/_datetime_parse.py:44
↓ 2 callersFunction_fs_reason
Map a filesystem `OSError` to a consistent, runtime-independent phrase. The raw `OSError` string is platform-specific (`[Errno 2] ENOENT: ...`)
src/anthropic/lib/tools/agent_toolset.py:165
↓ 2 callersMethod_get_azure_ad_token
(self)
src/anthropic/lib/foundry.py:254
↓ 2 callersMethod_get_azure_ad_token
(self)
src/anthropic/lib/foundry.py:466
↓ 2 callersFunction_get_numeric
(value: StrBytesIntFloat, native_expected_type: str)
src/anthropic/_utils/_datetime_parse.py:33
↓ 2 callersFunction_get_own_core_schema
(cls: type[pydantic.BaseModel])
src/anthropic/_models.py:602
↓ 2 callersFunction_get_params
(client: BaseClient[Any, Any])
tests/test_client.py:48
↓ 2 callersMethod_get_token
(self)
src/anthropic/lib/google_cloud/_client.py:371
↓ 2 callersMethod_hand_over_messages
Give the thread the history as the loop body left it. `reply` follows it unless `append_messages()` was called, which leaves the history to th
src/anthropic/lib/tools/_beta_runner.py:447
↓ 2 callersMethod_handle_item
The per-item body shared by `run`'s poll loop and `handle_item`. Runs a `SessionToolRunner` for the work item's session while heartbe
src/anthropic/lib/environments/_worker.py:651
↓ 2 callersMethod_handle_request
(self, thread: BetaMessageThread[ResponseFormatT])
src/anthropic/lib/tools/_beta_runner.py:661
↓ 2 callersMethod_handle_request
(self, thread: BetaAsyncMessageThread[ResponseFormatT])
src/anthropic/lib/tools/_beta_runner.py:1193
↓ 2 callersFunction_has_explicit_active_config
True if the user wrote a non-empty `active_config` pointer file. The user has told us which profile is active. If the chain gets as far as th
src/anthropic/lib/credentials/_constants.py:204
↓ 2 callersMethod_has_static_credential
(request: httpx2.Request)
src/anthropic/lib/credentials/_auth.py:73
↓ 2 callersMethod_hash_via_cache
(self, rel: str, full: Path, walk_start_ns: int)
src/anthropic/lib/tools/_file_store.py:266
↓ 2 callersFunction_heartbeat_loop
Keep the work-item lease alive while a session is being served. `work` must be bound to a sub-client authenticated for the environment; this
src/anthropic/lib/environments/_worker.py:176
↓ 2 callersMethod_idempotency_key
(self)
src/anthropic/_base_client.py:994
↓ 2 callersFunction_idle_script
Three empty polls, a fourth 301s later, a fifth, one claim, then one more empty poll before the script runs out.
tests/lib/environments/test_poller_method.py:359
↓ 2 callersFunction_infer_region
Infer the AWS region from the environment variables or from the boto3 session if available.
src/anthropic/lib/bedrock/_client.py:78
↓ 2 callersMethod_info_to_options
(self, info: PageInfo)
src/anthropic/_base_client.py:252
↓ 2 callersFunction_interrupted_sse_body
(id: str, text: str, error: type[httpx2.TransportError] | None)
tests/lib/threads/helpers.py:512
↓ 2 callersFunction_is_async_callable
Whether calling the given object returns a coroutine. Unlike `inspect.iscoroutinefunction(obj)` this also handles class instances that define
src/anthropic/_middleware.py:73
↓ 2 callersMethod_iter_events
(self)
src/anthropic/_streaming.py:70
↓ 2 callersFunction_keeps_base_url
Whether a `copy()` stays on the parent's deployment. Tokens are only valid for the deployment that minted them, so the parent's `TokenCache`
src/anthropic/_client.py:80
↓ 2 callersFunction_lease_lost_error
The 412 the API answers a heartbeat with once the item's lease was cleared (re-queued) or is held by another worker.
tests/lib/environments/test_worker.py:69
↓ 2 callersFunction_make
(fn: FunctionT)
src/anthropic/lib/tools/_beta_functions.py:427
↓ 2 callersMethod_make_pin
Pin requests sharing the state to the entry being tried (or warn that there is none).
src/anthropic/lib/middleware/_fallbacks.py:386
← previousnext →801–900 of 12,274, ranked by callers