MCPcopy Create free account

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

Functions9,455 in github.com/anthropics/anthropic-sdk-python

↓ 11 callersMethodmonotonic
(self)
tests/lib/environments/test_worker.py:1065
↓ 11 callersMethodquery
The query string that `query` is sent as, parsed back into a dict.
tests/test_prepare.py:81
↓ 11 callersFunctionresolve_region
Resolve the AWS region from constructor arg or env var. Does not silently default — returns None if no region is available.
src/anthropic/lib/aws/_credentials.py:82
↓ 11 callersFunctionseed
(event_id: str)
tests/lib/sessions/test_accumulate.py:28
↓ 11 callersMethodsend
(self, session_id: str, *, events: list[Any], extra_headers: Any = None)
tests/lib/tools/test_session_runner.py:229
↓ 11 callersMethodstr_replace
Replace text in a memory file.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:145
↓ 10 callersFunction_addition
(definition: Any)
tests/lib/tools/test_runners.py:1662
↓ 10 callersFunction_downloaded
A `SessionMemoryStores` with one store already downloaded, plus the fake `client.beta.memory_stores.memories` resource it calls.
tests/lib/tools/memory_sync/test_lost_response.py:28
↓ 10 callersFunction_downloaded
A `SessionMemoryStores` with one store already downloaded to disk.
tests/lib/tools/memory_sync/test_delete_discipline.py:32
↓ 10 callersFunction_install_aiter_work
(monkeypatch: pytest.MonkeyPatch, items: list[Any])
tests/lib/environments/test_worker.py:181
↓ 10 callersFunction_result_text
Concatenated text of the posted-back result's text blocks.
tests/lib/tools/test_session_runner.py:124
↓ 10 callersFunction_run_async
( client: AsyncAnthropic, *, tools: list[Any], messages: list[BetaMessageParam] )
tests/lib/tools/toolsets/test_runner.py:124
↓ 10 callersFunction_run_sync
(client: Anthropic, *, tools: list[Any], messages: list[BetaMessageParam])
tests/lib/tools/toolsets/test_runner.py:114
↓ 10 callersFunction_work_item
( *, work_type: str = "session", work_id: str = "w_1", session_id: str = "s_1", secret: str | None = None
tests/lib/environments/test_worker.py:173
↓ 10 callersFunctionaccumulate_managed_agents_event
( accumulated: AccumulatedEvent | None, event: BetaManagedAgentsAgentMessageEvent, )
src/anthropic/lib/sessions/_accumulate.py:22
↓ 10 callersMethodack
(self, work_id: str, **kwargs: Any)
tests/lib/environments/test_poller_method.py:61
↓ 10 callersMethodapprove
Approve a pending spend limit increase request. Writes a per-user spend limit at `amount` for the requester and transitions the
src/anthropic/resources/beta/organization/spend_limits/increase_requests.py:149
↓ 10 callersMethodbind_base_url
Set the API `base_url` the token exchange POSTs to. For standalone use (no client) or tests. Clients bind through `for_base_url`, whi
src/anthropic/lib/credentials/_workload.py:205
↓ 10 callersMethodclose
(self)
src/anthropic/_client.py:452
↓ 10 callersMethodclose
(self)
src/anthropic/_client.py:880
↓ 10 callersFunctionconstruct_type_unchecked
Loose coercion to the expected type with construction of nested values. Note: the returned value from this function is not guaranteed to match th
src/anthropic/_models.py:576
↓ 10 callersMethodcreate_enrollment_url
Create Enrollment URL Args: user_profile_id: The ID of the user profile to create an enrollment URL for (`uprof_...`).
src/anthropic/resources/beta/user_profiles.py:417
↓ 10 callersMethoddeny
Deny a pending spend limit increase request. Idempotent on `denied`; denying an already-`approved` request returns 400. Anth
src/anthropic/resources/beta/organization/spend_limits/increase_requests.py:206
↓ 10 callersFunctionfold
( msg: BetaManagedAgentsAgentMessageEvent, ev: BetaManagedAgentsDeltaEvent, )
tests/lib/sessions/test_accumulate.py:34
↓ 10 callersFunctionget_auth_headers
( *, method: str, url: str, headers: httpx2.Headers, aws_access_key: str | None, aws_s
src/anthropic/lib/aws/_auth.py:33
↓ 10 callersFunctionget_model_fields
(model: type[pydantic.BaseModel])
src/anthropic/_compat.py:111
↓ 10 callersFunctionget_origin
(t: type[Any])
src/anthropic/_compat.py:36
↓ 10 callersMethodhashtree
`{rel_path: sha256_hex}` of every file under the directory `under`. Unchanged files — same size, mtime, and ctime since the last call —
src/anthropic/lib/tools/_file_store.py:184
↓ 10 callersFunctionmake_event_iterator
( content: Iterator[bytes], *, sync: bool, client: Anthropic, async_client: AsyncAnthropic
tests/test_streaming.py:266
↓ 10 callersMethodmcp_oauth_validate
Validate Credential Args: vault_id: Identifier of the vault containing the credential. credential_id: Unique id
src/anthropic/resources/beta/vaults/credentials.py:497
↓ 10 callersFunctionmessage_start
()
tests/lib/test_refusal_fallback_streaming.py:110
↓ 10 callersMethodparse
(self, *, to: type[_T])
src/anthropic/_response.py:308
↓ 10 callersMethodparse
(self, *, to: type[_T])
src/anthropic/_response.py:421
↓ 10 callersMethodpause
Pause Deployment Args: deployment_id: Unique identifier of the deployment to pause. betas: Optional header to s
src/anthropic/resources/beta/deployments.py:496
↓ 10 callersMethodpoll
(self, environment_id: str, **kwargs: Any)
tests/lib/environments/test_poller_method.py:57
↓ 10 callersMethodredact
Redact a memory version Args: memory_store_id: The ID of the memory store that holds the version (`memstore_...`).
src/anthropic/resources/beta/memory_stores/memory_versions.py:247
↓ 10 callersFunctionrefusal_delta
(token: str | None = "tok_abc", has_prefill_claim: bool = True)
tests/lib/test_refusal_fallback_streaming.py:128
↓ 10 callersMethodrequest
( self, cast_to: Type[ResponseT], options: FinalRequestOptions, *, str
src/anthropic/_base_client.py:1110
↓ 10 callersFunctionresolve_workspace_id
Resolve the workspace ID from constructor arg or env var(s). Returns None if no workspace ID is available (caller should raise).
src/anthropic/lib/aws/_credentials.py:93
↓ 10 callersMethodreveal_token
The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a
src/anthropic/resources/beta/tunnels/tunnels.py:342
↓ 10 callersMethodrotate_token
The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a
src/anthropic/resources/beta/tunnels/tunnels.py:412
↓ 10 callersMethodstats
Get statistics about the work queue for an environment. Args: betas: Optional header to specify the beta version(s) you wa
src/anthropic/resources/beta/environments/work.py:482
↓ 10 callersMethodunpause
Unpause Deployment Args: deployment_id: Unique identifier of the deployment to unpause. betas: Optional header
src/anthropic/resources/beta/deployments.py:618
↓ 9 callersMethod__anext__
(self)
src/anthropic/_streaming.py:203
↓ 9 callersFunction_member_use
( name: str, input: dict[str, Any] | None = None, *, toolset_name: str | None = "browser" )
tests/lib/tools/toolsets/test_runnable.py:26
↓ 9 callersMethodaclose
(self)
tests/lib/test_credentials.py:3812
↓ 9 callersFunctionassert_empty_iter
(iter: Iterator[ServerSentEvent] | AsyncIterator[ServerSentEvent])
tests/test_streaming.py:261
↓ 9 callersFunctionasync_to_httpx_files
(files: None)
src/anthropic/_files.py:99
↓ 9 callersFunctionasyncify
Take a blocking function and create an async one that receives the same positional and keyword arguments. Usage: ```python def
src/anthropic/_utils/_sync.py:28
↓ 9 callersMethodcopy
Create a new client re-using the current options, with optional overrides. Passing either of `token_provider` / `credentials` replaces the
src/anthropic/lib/google_cloud/_client.py:356
↓ 9 callersFunctioncreated
(path: str, content: str)
tests/lib/tools/memory_sync/_fake_anthropic.py:73
↓ 9 callersMethodfinish
(self, reason: _LeaseEndReason)
src/anthropic/lib/environments/_worker.py:142
↓ 9 callersMethodhandle_item
Service a single, already-claimed work item without the poll loop. Builds the per-session `AgentToolContext` (workdir from this worke
src/anthropic/lib/environments/_worker.py:541
↓ 9 callersMethodlabel
Names a stream event after the block it belongs to, such as `a: content_block_stop`.
tests/lib/tools/test_runner_eager_tools.py:1080
↓ 9 callersFunctionrequest_body
(call: MockRequestCall)
tests/test_middleware.py:79
↓ 9 callersMethodto_dict
(self)
src/anthropic/lib/tools/_tool_params.py:24
↓ 9 callersFunctionto_httpx_files
(files: None)
src/anthropic/_files.py:42
↓ 9 callersMethodto_json
Generates a JSON string representing this model as it would be received from or sent to the API (but with indentation). By default, fields th
src/anthropic/_models.py:184
↓ 9 callersFunctionuploads_fail
Every create and update raises a connection error — after the server has saved the write (the response was lost) or before it arrived at all.
tests/lib/tools/memory_sync/test_lost_response.py:38
↓ 9 callersMethodwait
(self, context: BetaToolsetCallContext, input: BetaBrowserWaitInput)
src/anthropic/lib/tools/_toolsets/_browser.py:402
↓ 8 callersMethod_auth_block
Return the cached `authentication` sub-object from the config file.
src/anthropic/lib/credentials/_providers.py:500
↓ 8 callersFunction_blob_resource
(uri: str = "file:///x.bin", blob: str = "", mime: str | None = None)
tests/lib/tools/test_mcp_tool.py:47
↓ 8 callersMethod_calculate_nonstreaming_timeout
(self, max_tokens: int, max_nonstreaming_tokens: int | None)
src/anthropic/_base_client.py:788
↓ 8 callersFunction_downloaded
A `SessionMemoryStores` with one store already downloaded to disk.
tests/lib/tools/memory_sync/test_final_flush.py:26
↓ 8 callersFunction_idle_end_turn
()
tests/lib/tools/test_session_runner.py:114
↓ 8 callersFunction_message
(*blocks: dict[str, Any], stop: str = "tool_use")
tests/lib/tools/toolsets/test_browser_runner.py:35
↓ 8 callersFunction_message_json
()
tests/lib/test_stainless_helpers.py:41
↓ 8 callersMethod_resolve_under_root
(self, rel_path: str)
src/anthropic/lib/tools/_file_store.py:252
↓ 8 callersFunction_workload_credentials
()
tests/lib/test_credentials.py:2311
↓ 8 callersFunctionbeta_write_tool
(ctx: AgentToolContext)
src/anthropic/lib/tools/agent_toolset.py:722
↓ 8 callersMethoddo
(self, name: str, context: BetaToolsetCallContext, input: Any)
tests/lib/tools/toolsets/_fakes.py:79
↓ 8 callersFunctiondrive
()
tests/lib/tools/test_session_runner.py:614
↓ 8 callersFunctionerror_body
(*, type: str, message: str)
tests/test_middleware.py:75
↓ 8 callersFunctionget_origin
(tp: type[Any])
src/anthropic/_utils/_compat.py:19
↓ 8 callersFunctionunvalidated
Build one of the SDK's own context or report models around objects that already exist (a parsed `tool_use` block, a member's input model, a driver
src/anthropic/lib/tools/_toolsets/_runnable.py:66
↓ 8 callersMethodvalidate_archive
Check whether a plugin marketplace, uploaded as a `.zip` of the marketplace directory, would synchronize into claude.ai, without conn
src/anthropic/resources/beta/organization/plugin_marketplaces.py:300
↓ 8 callersMethodvalidate_repository
Check whether a plugin marketplace held in a public GitHub repository would synchronize into claude.ai, without connecting or storing
src/anthropic/resources/beta/organization/plugin_marketplaces.py:393
↓ 7 callersFunction_api_status_error
(code: int)
tests/lib/tools/test_session_runner.py:129
↓ 7 callersFunction_async_compact_runner
( client: AsyncAnthropic, *, context_management: Union[BetaContextManagementConfigParam, Omit] = o
tests/lib/tools/test_runners.py:2539
↓ 7 callersFunction_downloaded
A `SessionMemoryStores` with one store already downloaded to disk.
tests/lib/tools/memory_sync/test_keep_only_copy.py:21
↓ 7 callersMethod_ensure_memory_root
Ensure the memory root directory exists
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:678
↓ 7 callersFunction_error_text
(desktop: FakeDesktop, name: str, input: dict[str, Any])
tests/lib/tools/toolsets/test_computer_pipeline.py:53
↓ 7 callersMethod_make_client
(self)
tests/lib/test_bedrock_mantle.py:130
↓ 7 callersFunction_mcp_field_v1_or_v2
(obj: Any, name: str)
src/anthropic/lib/tools/mcp.py:80
↓ 7 callersFunction_message
(*blocks: dict[str, Any], stop: str = "tool_use")
tests/lib/tools/toolsets/test_computer_runner.py:40
↓ 7 callersFunction_mock_client
(result: CallToolResult | None = None)
tests/lib/tools/test_mcp_tool.py:67
↓ 7 callersFunction_read_result
(contents: list[Any])
tests/lib/tools/test_mcp_tool.py:51
↓ 7 callersFunction_requests
(respx_mock: MockRouter)
tests/lib/tools/toolsets/test_computer_runner.py:63
↓ 7 callersFunction_text_resource
(uri: str = "file:///x.txt", text: str = "hello", mime: str | None = None)
tests/lib/tools/test_mcp_tool.py:43
↓ 7 callersFunction_use
(name: str, input: dict[str, Any], id: str = "toolu_1")
tests/lib/tools/toolsets/test_computer_pipeline.py:49
↓ 7 callersMethod_validate_path
Validate and resolve memory paths
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:396
↓ 7 callersFunctionb64_obj
(data: object)
tests/test_prepare.py:121
↓ 7 callersFunctionbeta_agent_toolset_20260401
Return the `agent_toolset_20260401` implementations bound to `ctx`. The result is a plain list of `anthropic.lib.tools.BetaAsyncFunctionTool`
src/anthropic/lib/tools/agent_toolset.py:928
↓ 7 callersFunctionbeta_glob_tool
(ctx: AgentToolContext)
src/anthropic/lib/tools/agent_toolset.py:805
↓ 7 callersFunctionbeta_headers
(respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:104
↓ 7 callersFunctionblock_starts
(events: list[BetaRawMessageStreamEvent])
tests/lib/test_refusal_fallback_streaming.py:194
↓ 7 callersMethoddispose
Remove the root iff `open` created it; pre-existing roots are kept.
src/anthropic/lib/tools/_file_store.py:122
↓ 7 callersMethodexec
(self, cmd: str, timeout: float = BASH_DEFAULT_TIMEOUT)
src/anthropic/lib/tools/agent_toolset.py:486
↓ 7 callersMethodexecute
(self, context: BetaToolsetCallContext, name: Any, input: Any)
tests/lib/tools/toolsets/test_interface.py:139
↓ 7 callersMethodextra_headers
Return headers derived from the config file (e.g. `workspace_id`). Eagerly reads the config if not yet loaded. The returned dict is s
src/anthropic/lib/credentials/_providers.py:287
← previousnext →201–300 of 9,455, ranked by callers