MCPcopy Create free account

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

Functions14,068 in github.com/anthropics/anthropic-sdk-python

↓ 1 callersFunction_is_sync_cm_factory
True when `fn` is a function produced by `contextlib.contextmanager`. `contextmanager` wraps the generator function with `functools.wraps`, so
src/anthropic/lib/tools/_beta_functions.py:300
↓ 1 callersMethod_issue_secret
(self, item: Item)
tests/lib/environments/_fake_work_api.py:417
↓ 1 callersMethod_iter_chunks
Given an iterator that yields raw binary data, iterate over it and yield individual SSE chunks
src/anthropic/_streaming.py:361
↓ 1 callersMethod_iter_events
(self)
src/anthropic/_streaming.py:200
↓ 1 callersFunction_iteration
(type: str, model: str)
tests/lib/threads/helpers.py:331
↓ 1 callersMethod_kill_unless_ended
(self, output: _BashOutput)
src/anthropic/lib/tools/agent_toolset.py:667
↓ 1 callersMethod_lease_json
(self, item: Item, *, extended: bool)
tests/lib/environments/_fake_work_api.py:483
↓ 1 callersFunction_make_async_iterator
(iterable: Iterable[T], counter: Optional[Counter] = None)
tests/test_client.py:129
↓ 1 callersFunction_make_sync_iterator
(iterable: Iterable[T], counter: Optional[Counter] = None)
tests/test_client.py:122
↓ 1 callersFunction_make_targz
(path: Path, entries: dict[str, bytes])
tests/lib/tools/test_skills.py:80
↓ 1 callersFunction_make_targz_modes
(path: Path, entries: dict[str, tuple[bytes, int]])
tests/lib/tools/test_skills.py:93
↓ 1 callersFunction_make_zip_modes
(path: Path, entries: dict[str, tuple[bytes, int]])
tests/lib/tools/test_skills.py:84
↓ 1 callersFunction_media_type_literal_values
Extract the values of a `Required[Literal[...]]` TypedDict field.
tests/lib/tools/test_agent_toolset.py:518
↓ 1 callersFunction_migrate_legacy_config
Adapter: convert a flat legacy config dict into the new nested shape. Many tests in this file predate the schema migration and pass legacy fl
tests/lib/test_credentials.py:114
↓ 1 callersFunction_new_system
(params: dict[str, Any])
tests/lib/threads/helpers.py:867
↓ 1 callersFunction_old_enough_to_cache
(st: os.stat_result, walk_start_ns: int)
src/anthropic/lib/tools/_file_store.py:423
↓ 1 callersMethod_over_limit_error
(self)
src/anthropic/lib/tools/_files.py:74
↓ 1 callersMethod_params_from_url
(self, url: URL)
src/anthropic/_base_client.py:250
↓ 1 callersMethod_parse_retry_after_header
Returns a float of the number of seconds (not milliseconds) to wait after retrying, or None if unspecified. About the Retry-After header: htt
src/anthropic/_base_client.py:948
↓ 1 callersFunction_parse_timezone
(value: Optional[str])
src/anthropic/_utils/_datetime_parse.py:56
↓ 1 callersFunction_partial_reply
The part of a streamed reply worth keeping when the stream ended early, or `None` if nothing is. An unfinished block stays only if it is `text`, b
src/anthropic/lib/threads/_thread_state.py:617
↓ 1 callersFunction_paths_to_skills
(type_: Any, path: str = "")
tests/lib/tools/test_skills.py:456
↓ 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:40
↓ 1 callersMethod_prepare_options
Hook for mutating the given options
src/anthropic/_base_client.py:1260
↓ 1 callersMethod_prepare_options
Hook for mutating the given options
src/anthropic/_base_client.py:2056
↓ 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:800
↓ 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:2063
↓ 1 callersMethod_prepare_request
(self, request: httpx2.Request)
src/anthropic/lib/bedrock/_mantle.py:442
↓ 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:645
↓ 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:831
↓ 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:867
↓ 1 callersFunction_pydantic_locks_model_rebuild
()
src/anthropic/_models.py:132
↓ 1 callersMethod_read
Read the body the way `send` does when it is not asked to stream.
src/anthropic/_base_client.py:1579
↓ 1 callersMethod_read
Read the body the way `send` does when it is not asked to stream.
src/anthropic/_base_client.py:2384
↓ 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:944
↓ 1 callersMethod_read_connection
(self, connection: contextlib.AsyncExitStack)
src/anthropic/lib/tools/_beta_session_runner.py:486
↓ 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:536
↓ 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:767
↓ 1 callersMethod_recover
Rebuild a destroyed folder from the server; sends no deletes, no uploads.
src/anthropic/lib/tools/_memories.py:685
↓ 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:827
↓ 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:1343
↓ 1 callersMethod_request
( self, cast_to: Type[ResponseT], options: FinalRequestOptions, *, str
src/anthropic/_base_client.py:2144
↓ 1 callersMethod_request_api_list
( self, model: Type[_T], page: Type[AsyncPageT], options: FinalRequestOptions,
src/anthropic/_base_client.py:2478
↓ 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:600
↓ 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:1074
↓ 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:544
↓ 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 callersMethod_save
(self, store: _AttachedStore, rel: str, content: str, replacing: str | None)
src/anthropic/lib/tools/_memories.py:524
↓ 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:845
↓ 1 callersMethod_save_within_timeout
(self, save: Callable[[], Awaitable[None]], name: str, if_cut_off: str)
src/anthropic/lib/environments/_worker.py:592
↓ 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:204
↓ 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:5318
↓ 1 callersMethod_send
(self, data: bytes)
src/anthropic/lib/tools/agent_toolset.py:647
↓ 1 callersMethod_send
(self, result: DispatchedToolResultParams)
src/anthropic/lib/tools/_beta_session_runner.py:1036
↓ 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:781
↓ 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:408
↓ 1 callersMethod_should_retry_failure
Whether to retry an attempt that failed in transport. `response` is set when its headers had arrived before the failure.
src/anthropic/_base_client.py:1043
↓ 1 callersMethod_sleep_for_retry
( self, *, retries_taken: int, max_retries: int, options: FinalRequestOptions, response: httpx2.Respon
src/anthropic/_base_client.py:1603
↓ 1 callersMethod_sleep_for_retry
( self, *, retries_taken: int, max_retries: int, options: FinalRequestOptions, response: httpx2.Respon
src/anthropic/_base_client.py:2410
↓ 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:290
↓ 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:377
↓ 1 callersMethod_sync_path
( self, store: _AttachedStore, rel: str, remote: BetaManagedAgentsMemory | Non
src/anthropic/lib/tools/_memories.py:738
↓ 1 callersMethod_sync_store
(self, store: _AttachedStore, final: bool = False)
src/anthropic/lib/tools/_memories.py:416
← previousnext →1,501–1,600 of 14,068, ranked by callers