MCPcopy Create free account

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

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

↓ 1 callersFunction_platform_supported
()
src/anthropic/lib/tools/_file_store.py:293
↓ 1 callersFunction_prepare_options
(input_options: FinalRequestOptions, custom_headers: Mapping[str, str])
src/anthropic/lib/bedrock/_client.py:41
↓ 1 callersMethod_prepare_options
Hook for mutating the given options
src/anthropic/_base_client.py:1176
↓ 1 callersMethod_prepare_options
Hook for mutating the given options
src/anthropic/_base_client.py:1957
↓ 1 callersMethod_prepare_options
(self, options: FinalRequestOptions)
src/anthropic/_client.py:402
↓ 1 callersMethod_prepare_options
(self, options: FinalRequestOptions)
src/anthropic/lib/aws/_client.py:153
↓ 1 callersMethod_prepare_options
(self, options: FinalRequestOptions)
src/anthropic/lib/google_cloud/_client.py:386
↓ 1 callersMethod_prepare_options
(self, options: FinalRequestOptions)
tests/test_client.py:773
↓ 1 callersMethod_prepare_request
This method is used as a callback for mutating the `Request` object after it has been constructed. This is useful for cases where you
src/anthropic/_base_client.py:1964
↓ 1 callersMethod_prepare_request
(self, request: httpx2.Request)
src/anthropic/lib/bedrock/_mantle.py:443
↓ 1 callersMethod_prepare_request
(self, request: httpx2.Request)
src/anthropic/lib/aws/_client.py:383
↓ 1 callersMethod_prepare_url
Merge a URL argument together with any 'base_url' on the client, to create the URL used for the outgoing request.
src/anthropic/_base_client.py:579
↓ 1 callersFunction_prepend_seam_blocks
(response: APIResponse[Any], seams: list[dict[str, Any]])
src/anthropic/lib/middleware/_fallbacks.py:1470
↓ 1 callersFunction_prepend_seam_blocks_async
(response: AsyncAPIResponse[Any], seams: list[dict[str, Any]])
src/anthropic/lib/middleware/_fallbacks.py:1485
↓ 1 callersMethod_primitive_value_to_str
(self, value: PrimitiveData)
src/anthropic/_qs.py:120
↓ 1 callersMethod_process_response_data
( self, *, data: object, cast_to: type[ResponseT], response: httpx2.Re
src/anthropic/_base_client.py:765
↓ 1 callersMethod_pull_all
Fetch and write the given memories, `_FETCH_CONCURRENCY` at a time. The sync's content pass: the listing carried no content, so each
src/anthropic/lib/tools/_memories.py:768
↓ 1 callersFunction_pydantic_locks_model_rebuild
()
src/anthropic/_models.py:132
↓ 1 callersFunction_read_binary_block
Read an image/PDF as a base64 `image`/`document` content block. The text cap does not apply here — its default would reject most real images.
src/anthropic/lib/tools/agent_toolset.py:924
↓ 1 callersMethod_read_connection
(self, connection: contextlib.AsyncExitStack)
src/anthropic/lib/tools/_beta_session_runner.py:466
↓ 1 callersMethod_read_credentials_if_exists
`_read_credentials` variant that returns `None` on absence instead of raising — used by the federation disk-cache path where a missing
src/anthropic/lib/credentials/_providers.py:634
↓ 1 callersFunction_read_json
(response: httpx2.Response)
src/anthropic/lib/middleware/_fallbacks.py:1607
↓ 1 callersFunction_read_json_async
(response: httpx2.Response)
src/anthropic/lib/middleware/_fallbacks.py:1614
↓ 1 callersMethod_read_stream
( self, stream: AsyncStream[BetaManagedAgentsStreamSessionEvents], reads_began: float, *, idle: bool
src/anthropic/lib/tools/_beta_session_runner.py:512
↓ 1 callersMethod_record_response
(self, heartbeat: BetaSelfHostedWorkHeartbeatResponse, sent_at: float)
src/anthropic/lib/environments/_lease.py:138
↓ 1 callersMethod_record_waits
(self, event: Event)
tests/lib/tools/_fake_sessions_api.py:759
↓ 1 callersMethod_recover
Rebuild a destroyed folder from the server; sends no deletes, no uploads.
src/anthropic/lib/tools/_memories.py:595
↓ 1 callersMethod_remove_local
Remove the file for a memory the server no longer has, if it still holds `expect_sha`. Returns `None` when the file is gone from disk, `expec
src/anthropic/lib/tools/_memories.py:728
↓ 1 callersMethod_render
( self, call: CallRecord, state: BetaBrowserState, file_policy: BetaFilePolicy | None )
src/anthropic/lib/tools/_toolsets/_pipeline.py:188
↓ 1 callersFunction_replay_reason
The `error_code` of a rejection that a full replay under a new thread recovers from, if it is one.
src/anthropic/lib/threads/_thread_state.py:586
↓ 1 callersMethod_request
( self, cast_to: Type[ResponseT], options: FinalRequestOptions, *, str
src/anthropic/_base_client.py:1259
↓ 1 callersMethod_request
( self, cast_to: Type[ResponseT], options: FinalRequestOptions, *, str
src/anthropic/_base_client.py:2045
↓ 1 callersMethod_request_api_list
( self, model: Type[_T], page: Type[AsyncPageT], options: FinalRequestOptions,
src/anthropic/_base_client.py:2364
↓ 1 callersMethod_request_options
(self, overrides: TurnOverrides, *, stream: bool)
src/anthropic/lib/threads/_thread_state.py:457
↓ 1 callersFunction_require
Fall back to `env_var` for `value`; raise a clear error if still empty. The `ANTHROPIC_*` env vars are the ones the `ant beta:worker poll --on-wo
src/anthropic/lib/environments/_worker.py:92
↓ 1 callersFunction_require_env
(name: str)
examples/managed-agents-self-hosted-sandbox-worker.py:47
↓ 1 callersMethod_respond
(self, kind: str, request: httpx2.Request)
tests/lib/tools/_fake_sessions_api.py:596
↓ 1 callersMethod_retry_partial_turn
If nothing is staged and the history ends with a turn whose stream ended early (its messages, then its partial reply if any content arrived),
src/anthropic/lib/threads/_thread_state.py:355
↓ 1 callersFunction_run_session_tools
Internal: drive a `SessionToolRunner` as an async context manager. No result is posted once `is_replaced` is true. `on_idle` and `on_yield` run i
src/anthropic/lib/tools/_beta_session_runner.py:1051
↓ 1 callersMethod_run_tool
(self, tool: BetaAsyncRunnableTool, tool_use: BetaToolUseBlock)
src/anthropic/lib/tools/_beta_runner.py:1417
↓ 1 callersMethod_run_tools
(self, session: BetaManagedAgentsSession)
src/anthropic/lib/environments/_worker.py:543
↓ 1 callersMethod_run_tools_while_streaming
Passes on the reply's events, and runs each tool call once the reader is done with the event that shows the model has moved on from it. Asking
src/anthropic/lib/tools/_beta_runner.py:1076
↓ 1 callersMethod_run_tools_while_streaming
Passes on the reply's events, and runs each tool call once the reader is done with the event that shows the model has moved on from it. Asking
src/anthropic/lib/tools/_beta_runner.py:1621
↓ 1 callersMethod_run_toolset_member
(self, tool_use: BetaToolUseBlock)
src/anthropic/lib/tools/_beta_runner.py:1440
↓ 1 callersFunction_save_output
Returns the sentence that names the file, which is empty if it could not be written.
src/anthropic/lib/tools/agent_toolset.py:825
↓ 1 callersMethod_save_within_timeout
(self, save: Callable[[], Awaitable[None]], name: str, if_cut_off: str)
src/anthropic/lib/environments/_worker.py:590
↓ 1 callersFunction_scoped_client
Build the runner's request client. With an environment key, defer to `_copy_client_with_bearer_auth` for a Bearer-only sub-client. Without on
src/anthropic/lib/tools/_beta_session_runner.py:184
↓ 1 callersFunction_sdk_frame_locals
(code name, locals) for every traceback frame owned by the anthropic package, across the full `__context__` / `__cause__` chain.
tests/lib/test_credentials.py:5162
↓ 1 callersMethod_send
(self, data: bytes)
src/anthropic/lib/tools/agent_toolset.py:627
↓ 1 callersMethod_send
(self, result: DispatchedToolResultParams)
src/anthropic/lib/tools/_beta_session_runner.py:1013
↓ 1 callersMethod_send_heartbeat
(self)
src/anthropic/lib/environments/_lease.py:126
↓ 1 callersMethod_serialize_multipartform
(self, data: Mapping[object, object])
src/anthropic/_base_client.py:715
↓ 1 callersFunction_serving_iteration_entry
The serving hop's `fallback_message` completer entry: its own self-reported iteration relabeled, or one built from its delta usage.
src/anthropic/lib/middleware/_fallbacks.py:1254
↓ 1 callersFunction_set_messages
(*added: BetaMessageParam)
tests/lib/threads/helpers.py:589
↓ 1 callersMethod_should_retry
(self, response: httpx2.Response)
src/anthropic/_client.py:435
↓ 1 callersMethod_sleep_for_retry
( self, *, retries_taken: int, max_retries: int, options: FinalRequestOptions, response: httpx2.Respon
src/anthropic/_base_client.py:1504
↓ 1 callersMethod_sleep_for_retry
( self, *, retries_taken: int, max_retries: int, options: FinalRequestOptions, response: httpx2.Respon
src/anthropic/_base_client.py:2296
↓ 1 callersMethod_splice_fallback_stream
Wrap the refusable stream in a response whose body passes events through until a retryable refusal, then splices the fallback chain's events o
src/anthropic/lib/middleware/_fallbacks.py:403
↓ 1 callersMethod_splice_fallback_stream_async
( self, *, request: APIRequest, body: dict[str, Any], initial_model: s
src/anthropic/lib/middleware/_fallbacks.py:443
↓ 1 callersMethod_spliced_frames
( self, *, request: APIRequest, body: dict[str, Any], initial_model: s
src/anthropic/lib/middleware/_fallbacks.py:501
↓ 1 callersMethod_spliced_frames_async
( self, *, request: APIRequest, body: dict[str, Any], initial_model: s
src/anthropic/lib/middleware/_fallbacks.py:625
↓ 1 callersFunction_split_tools
( tools: Iterable[BetaToolUnionParam | RunnableToolT], )
src/anthropic/lib/threads/_thread_state.py:669
↓ 1 callersFunction_sse
`message` as the server-sent event stream a streaming request receives (one event per content block).
tests/lib/tools/toolsets/test_runner.py:76
↓ 1 callersMethod_steps
The runner's loop. `__run__` drives it, one step for each item.
src/anthropic/lib/tools/_beta_runner.py:714
↓ 1 callersMethod_steps
The runner's loop. `__run__` drives it, one step for each item.
src/anthropic/lib/tools/_beta_runner.py:1252
↓ 1 callersMethod_stop_if_held
(self)
src/anthropic/lib/environments/_lease.py:88
↓ 1 callersMethod_store_root
Where one store's files land on disk. The store's files land at its `mount_path` — the very location the agent's system prompt tells
src/anthropic/lib/tools/_memories.py:267
↓ 1 callersMethod_stored_messages_to_send_again
The stored history as a turn that sends the whole history sends it: the messages up to the last reply go without the `cache_control` of their
src/anthropic/lib/threads/_thread_state.py:411
↓ 1 callersMethod_stringify_item
( self, key: str, value: Data, opts: Options, )
src/anthropic/_qs.py:66
↓ 1 callersMethod_strip_raw_response_header
(self)
src/anthropic/_models.py:1114
↓ 1 callersFunction_summarise_event
(ev: Any)
examples/managed-agents-self-hosted-sandbox-worker.py:154
↓ 1 callersMethod_suppressed_start_message
`message` from this fallback's `message_start` when it was not re-emitted because the caller already received a `message_start`. `None
src/anthropic/lib/middleware/_fallbacks.py:983
↓ 1 callersFunction_symlink_loop_error
()
src/anthropic/lib/tools/agent_toolset.py:370
↓ 1 callersMethod_sync_path
( self, store: _AttachedStore, rel: str, remote: BetaManagedAgentsMemory | Non
src/anthropic/lib/tools/_memories.py:639
↓ 1 callersMethod_take_notices
The refused-navigation line and the dialog lines as text blocks, now that a result can include them.
src/anthropic/lib/tools/_toolsets/_pipeline.py:222
↓ 1 callersFunction_text_cases
`text_cases.json`, the table both SDKs' tests read for the text folds: `{c*N}` stands for N copies of the character c, and where the SDKs differ o
tests/lib/tools/toolsets/test_pipeline.py:852
↓ 1 callersFunction_text_deltas
`text` split into one delta per word, which concatenate back to `text`.
tests/lib/threads/helpers.py:760
↓ 1 callersMethod_thread_for_turn
The `thread` field of a turn that sends `params`, the thread's fields with `overrides`. The server takes the create-only fields from the threa
src/anthropic/lib/threads/_thread_state.py:426
↓ 1 callersFunction_to_generated
Map a Parsed* wrapper to the generated block class it stands in for.
tests/lib/streaming/test_parsed_content_blocks.py:33
↓ 1 callersFunction_to_session_content
Bridge Messages-API tool-result content to the narrower Sessions-API content union. The two APIs share text/image/document/search_result block sh
src/anthropic/lib/tools/_beta_session_runner.py:197
↓ 1 callersFunction_tool_removal
(name: str)
tests/lib/tools/toolsets/test_runner.py:105
↓ 1 callersMethod_tools_for
(self, env: AgentToolContext)
src/anthropic/lib/environments/_worker.py:295
↓ 1 callersMethod_toolset_run
One member call, under the lock: the family's pipeline from the raw `tool_use.input` to the content.
src/anthropic/lib/tools/_toolsets/_base.py:318
↓ 1 callersMethod_toolset_run
( self, context: BetaToolsetCallContext, name: str, input: Mapping[str, object] )
src/anthropic/lib/tools/_toolsets/_base.py:403
↓ 1 callersFunction_transform_file
(file: FileTypes)
src/anthropic/_files.py:63
↓ 1 callersFunction_unchanged_since_hashed
(cached: _Hashed, st: os.stat_result)
src/anthropic/lib/tools/_file_store.py:410
↓ 1 callersFunction_union_members
Return the runtime classes in an `Annotated[Union[...], ...]` type alias.
tests/lib/streaming/test_parsed_content_blocks.py:22
↓ 1 callersFunction_unsupported_features
The `unsupported` values of a `thread_unsupported_request` rejection, none if it lists none, or `None` for any other error.
src/anthropic/lib/threads/_thread_state.py:599
↓ 1 callersMethod_validate_headers
Validate the headers a request is about to be sent with. `omitted` holds the (lowercase) names a header layer explicitly removed with `Omit`.
src/anthropic/_base_client.py:818
↓ 1 callersMethod_validate_headers
(self, headers: httpx2.Headers, omitted: frozenset[str])
src/anthropic/lib/aws/_client.py:147
↓ 1 callersFunction_validate_non_model_type
(*, type_: type[_T], value: object)
src/anthropic/_models.py:1006
↓ 1 callersMethod_wait_to_retry
(self, attempt: int)
src/anthropic/lib/tools/_beta_session_runner.py:1029
↓ 1 callersFunction_walk_deadline
Stop a walk that uses `_GREP_CPU_SECONDS`, if this thread can take a signal that the host leaves unused.
src/anthropic/lib/tools/agent_toolset.py:1172
↓ 1 callersFunction_walk_grep
(rx: re.Pattern[str], search: Path)
src/anthropic/lib/tools/agent_toolset.py:1197
↓ 1 callersFunction_with_threads_beta
`headers` with the threads beta appended to a caller-set `anthropic-beta` header, which would otherwise replace the one `create()` builds from `be
src/anthropic/lib/threads/_thread_state.py:577
↓ 1 callersFunction_without_compaction_incompatible_params
A compaction request returns only the compaction block, never a reply, so the API rejects the params that only shape a reply. The runner's later r
src/anthropic/lib/tools/_beta_runner.py:147
↓ 1 callersFunction_without_format
(output_config: BetaOutputConfigParam)
src/anthropic/lib/tools/_beta_runner.py:143
↓ 1 callersFunction_wrapper_dir
Screen every member name (raising on path traversal, extracted or not), then return the wrapper directory shared by the members that will be e
src/anthropic/lib/tools/_skills.py:86
↓ 1 callersFunction_zip_info_is_dir
(info: zipfile.ZipInfo)
src/anthropic/lib/tools/_skills.py:111
↓ 1 callersFunction_zip_info_is_special
True for a Unix-host entry recorded as a symlink, device, FIFO or socket. Type bits from other hosts are not a mode, so those entries stay plain f
src/anthropic/lib/tools/_skills.py:104
← previousnext →1,501–1,600 of 13,873, ranked by callers