MCPcopy Create free account

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

Functions13,873 in github.com/anthropics/anthropic-sdk-python

↓ 11 callersFunctionsse
(events: Sequence[dict[str, Any]])
tests/test_open_telemetry.py:271
↓ 11 callersMethodstr_replace
Replace text in a memory file.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:146
↓ 10 callersFunctionTypeAdapter
(*_args: Any, **_kwargs: Any)
src/anthropic/_models.py:1041
↓ 10 callersFunction_addition
(definition: Any)
tests/lib/tools/test_runners.py:1640
↓ 10 callersMethod_append
(self, *events: Event)
tests/lib/tools/_fake_sessions_api.py:740
↓ 10 callersMethod_can_act
(self, thread: str)
tests/lib/tools/_fake_sessions_api.py:648
↓ 10 callersFunction_client_kwargs
When `deferred`, the project comes from ADC on the first request instead of from the arguments.
tests/lib/test_google_cloud.py:89
↓ 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 callersMethod_enforce_trailing_slash
(self, url: URL)
src/anthropic/_base_client.py:516
↓ 10 callersFunction_message
(*blocks: dict[str, Any], stop: str = "tool_use")
tests/lib/tools/toolsets/test_browser_runner.py:36
↓ 10 callersFunction_run_async
( client: AsyncAnthropic, *, tools: list[Any], messages: list[BetaMessageParam] )
tests/lib/tools/toolsets/test_runner.py:129
↓ 10 callersFunction_run_sync
(client: Anthropic, *, tools: list[Any], messages: list[BetaMessageParam])
tests/lib/tools/toolsets/test_runner.py:119
↓ 10 callersMethodack
(self)
tests/lib/environments/test_worker_properties.py:303
↓ 10 callersFunctionaclose_runnable_tool
Run a runnable tool's optional cleanup. Drives the legacy `aclose` / `close` attribute (awaited if it returns an awaitable) and, when the too
src/anthropic/lib/tools/_beta_functions.py:318
↓ 10 callersMethodactivate
Verify pending External Storage and make it available. Storage that is already available, active or draining comes back unchanged, wi
src/anthropic/resources/beta/organization/external_storage.py:417
↓ 10 callersFunctionattributes
The attributes to start a span with: `values` without those that are `None`.
src/anthropic/lib/_tracing/_attributes.py:49
↓ 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:201
↓ 10 callersMethodclose
(self)
tests/utils.py:205
↓ 10 callersFunctionconstruct
(client_class: ClientClass, *arguments: dict[str, object])
tests/lib/test_client_copy.py:206
↓ 10 callersFunctioncopy_platform_client
Builds the client that a platform client's `copy()` returns. `platform_options` holds the other arguments of the constructor of `client`, with th
src/anthropic/lib/_platform_client.py:16
↓ 10 callersMethodcreate_enrollment_url
Create a link that sends the profile's end customer to the Verification Portal from Claude Platform on AWS. On the Claude AP
src/anthropic/resources/beta/user_profiles/user_profiles.py:551
↓ 10 callersFunctioncreate_stream_async
( client: AsyncAnthropic, *, speed: Literal["standard", "fast"] | Omit = omit )
tests/lib/test_refusal_fallback_streaming.py:227
↓ 10 callersFunctioncreated
(path: str, content: str)
tests/lib/tools/memory_sync/_fake_anthropic.py:73
↓ 10 callersFunctionfold
( msg: BetaManagedAgentsAgentMessageEvent, ev: BetaManagedAgentsDeltaEvent, )
tests/lib/sessions/test_accumulate.py:39
↓ 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:376
↓ 10 callersMethodmcp_oauth_validate
Validate an MCP OAuth Credential Args: vault_id: Identifier of the vault containing the credential. credential_
src/anthropic/resources/beta/vaults/credentials.py:524
↓ 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: This endpoint is in
src/anthropic/resources/beta/deployments.py:520
↓ 10 callersFunctionplatform_arguments
(client_class: ClientClass)
tests/lib/test_client_copy.py:182
↓ 10 callersMethodpoll
(self)
tests/lib/environments/test_worker_properties.py:300
↓ 10 callersMethodread
(self, size: int = -1)
tests/test_prepare.py:666
↓ 10 callersMethodregenerate_signing_secret
Replace an organization webhook endpoint's signing secret. The old secret stops working immediately. The new secret is returned only
src/anthropic/resources/beta/organization/webhooks.py:469
↓ 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 callersMethodrespond
(request: httpx2.Request)
tests/lib/tools/test_runner_eager_tools.py:1118
↓ 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:361
↓ 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:436
↓ 10 callersMethodsign_out
Sign a member out of Claude everywhere, without removing them from the organization. This ends their sign-in sessions and removes the
src/anthropic/resources/beta/organization/users.py:265
↓ 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:522
↓ 10 callersMethodstatuses
(self, kind: str)
tests/lib/environments/_fake_work_api.py:181
↓ 10 callersMethodtest
Send one test span, named `anthropic.test`, to the destination with its registered headers, once and without retries, and report the
src/anthropic/resources/beta/organization/telemetry_destinations/telemetry_destinations.py:503
↓ 10 callersMethodto_dict
(self)
src/anthropic/lib/tools/_tool_params.py:24
↓ 10 callersMethodunpause
Unpause Deployment Args: deployment_id: Unique identifier of the deployment to unpause. betas: This endpoint is
src/anthropic/resources/beta/deployments.py:652
↓ 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 callersFunction_message_response
()
tests/lib/test_credentials.py:2400
↓ 9 callersFunctionassert_empty_iter
(iter: Iterator[ServerSentEvent] | AsyncIterator[ServerSentEvent])
tests/test_streaming.py:371
↓ 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 callersFunctionbash
(id: str, command: str, thread: str = PRIMARY)
tests/lib/tools/test_session_runner.py:300
↓ 9 callersFunctionblock_starts
(events: list[BetaRawMessageStreamEvent])
tests/lib/test_refusal_fallback_streaming.py:207
↓ 9 callersMethodcheck
(self, session: FakeSession, holds: object, violation: str)
tests/lib/tools/test_session_runner_properties.py:169
↓ 9 callersFunctioncreate_message_async
( client: AsyncAnthropic, *, speed: Literal["standard", "fast"] | Omit = omit )
tests/lib/test_refusal_fallback.py:101
↓ 9 callersMethodexec
Run `cmd` in the shell. A timeout or a cancellation kills the shell and everything it started, and so does a command that ends the sh
src/anthropic/lib/tools/agent_toolset.py:565
↓ 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 callersFunctionmarked
A user message whose only block has a `cache_control` marker.
tests/lib/threads/helpers.py:169
↓ 9 callersFunctionrequest_body
(call: MockRequestCall)
tests/test_middleware.py:80
↓ 9 callersFunctionreturning
(value: object)
tests/lib/tools/_fake_sessions_api.py:843
↓ 9 callersFunctionrun_turn
Call `send()`, `parse()` or `stream()`, and read a stream to its end.
tests/lib/threads/test_async_beta_threads.py:1852
↓ 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:253
↓ 9 callersFunctiontool_stream_events
The events of `stream_events`, with a `tool_use` block after the text.
tests/test_open_telemetry.py:754
↓ 9 callersFunctiontraced
(spans: Spans)
tests/lib/environments/test_poller.py:306
↓ 9 callersFunctiontype_names
The `type` of each member of a union.
tests/test_open_telemetry.py:8257
↓ 9 callersFunctionuntil_ended
(pid: object)
tests/lib/tools/test_agent_toolset.py:983
↓ 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 callersFunctionviolations
(steps: list[Step], max_calls: int = 1, **options: Any)
tests/lib/tools/test_session_runner_properties.py:607
↓ 8 callersMethod__anext__
(self)
src/anthropic/_streaming.py:186
↓ 8 callersMethod_auth_block
Return the cached `authentication` sub-object from the config file.
src/anthropic/lib/credentials/_providers.py:503
↓ 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_blocked_on
(self, thread: str)
tests/lib/tools/_fake_sessions_api.py:652
↓ 8 callersMethod_calculate_nonstreaming_timeout
(self, max_tokens: int, max_nonstreaming_tokens: int | None)
src/anthropic/_base_client.py:867
↓ 8 callersFunction_downloaded
A `SessionMemoryStores` with one store already downloaded to disk.
tests/lib/tools/memory_sync/test_final_flush.py:26
↓ 8 callersMethod_make_client
(self)
tests/lib/test_bedrock_mantle.py:178
↓ 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 callersMethod_runnable_tools
The tools the runner runs, by name: the thread's runnable tools with the overrides applied.
src/anthropic/lib/tools/_beta_runner.py:531
↓ 8 callersMethod_sent_authorization
(client: Anthropic | AsyncAnthropic, respx_mock: MockRouter)
tests/lib/test_credentials.py:4584
↓ 8 callersFunction_sync_weather_tool
()
tests/lib/tools/test_runners.py:2512
↓ 8 callersFunction_workload_credentials
()
tests/lib/test_credentials.py:2449
↓ 8 callersFunctionapply
(session: FakeSession, steps: list[Step])
tests/lib/tools/test_fake_sessions_api.py:43
↓ 8 callersFunctionas_current_span
Makes `span`, if any, the current span for the block, without ending it when the block exits.
src/anthropic/lib/_tracing/_tools.py:170
↓ 8 callersFunctionassert_sends_conversation
Assert that `request`, which follows the `toolu_a` reply `msg_a` to the weather question, shows the model `conversation`. With default settings it
tests/lib/threads/helpers.py:652
↓ 8 callersFunctioncall
Makes a request the way an SDK method does, which names its span.
tests/test_tracing.py:149
↓ 8 callersFunctioncontent
(call: DispatchedToolCall)
tests/lib/tools/test_session_runner.py:96
↓ 8 callersMethoddispose
Remove the root iff `open` created it; pre-existing roots are kept.
src/anthropic/lib/tools/_file_store.py:122
↓ 8 callersMethoddo
(self, name: str, context: BetaToolsetCallContext, input: Any)
tests/lib/tools/toolsets/_fakes.py:79
↓ 8 callersFunctionerror_body
(*, type: str, message: str)
tests/test_middleware.py:76
↓ 8 callersFunctionget_origin
(tp: type[Any])
src/anthropic/_utils/_compat.py:19
↓ 8 callersMethodheaders
(self, name: str)
tests/lib/tools/_fake_sessions_api.py:185
↓ 8 callersFunctionplatform_clients
One client of each platform class, sync and async, with the `open_telemetry` option.
tests/test_open_telemetry.py:3802
↓ 8 callersFunctionrejecting_non_json
`resource` on a copy of its client that handles a 200 whose body is not JSON like a connection error. A proxy can cut a body off or answer with a
src/anthropic/lib/_retry.py:65
↓ 8 callersFunctionrun_turn
Call `send()`, `parse()` or `stream()`, and read a stream to its end.
tests/lib/threads/test_beta_threads.py:2259
↓ 8 callersFunctiontext
(value: object)
tests/lib/tools/test_session_runner.py:92
↓ 8 callersFunctiontimed
(at: float, actions: Iterable[Step])
tests/lib/tools/_fake_sessions_api.py:871
↓ 8 callersMethodto_dict
(self)
tests/lib/streaming/test_beta_messages.py:43
↓ 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 callersFunctionurl_attributes
(span: ReadableSpan)
tests/test_open_telemetry.py:2900
↓ 8 callersFunctionutf8_size
(text: str)
tests/test_open_telemetry.py:275
← previousnext →301–400 of 13,873, ranked by callers