MCPcopy Create free account

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

Functions4,863 in github.com/anthropics/anthropic-sdk-python

↓ 1 callersFunction_transform_file
(file: FileTypes)
src/anthropic/_files.py:65
↓ 1 callersFunction_transform_typeddict
( data: Mapping[str, object], expected_type: type, )
src/anthropic/_utils/_transform.py:265
↓ 1 callersFunction_union_members
Return the runtime classes in an `Annotated[Union[...], ...]` type alias.
tests/lib/streaming/test_parsed_content_blocks.py:18
↓ 1 callersMethod_validate_headers
Validate the given default headers and custom headers. Does nothing by default.
src/anthropic/_base_client.py:731
↓ 1 callersMethod_validate_headers
(self, headers: Headers, custom_headers: Headers)
src/anthropic/lib/aws/_client.py:139
↓ 1 callersFunction_validate_no_symlink_escape
(target_path: Path, memory_root: Path)
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:337
↓ 1 callersFunction_validate_non_model_type
(*, type_: type[_T], value: object)
src/anthropic/_models.py:879
↓ 1 callersFunction_wait_first
Return as soon as any of ``events`` is set.
src/anthropic/lib/tools/_beta_session_runner.py:952
↓ 1 callersFunction_walk_grep
(rx: re.Pattern[str], search: Path)
src/anthropic/lib/tools/agent_toolset.py:676
↓ 1 callersMethodaiter_lines
(self)
src/anthropic/_legacy_response.py:493
↓ 1 callersMethodaiter_text
(self, chunk_size: int | None = None)
src/anthropic/_legacy_response.py:490
↓ 1 callersFunctionassert_empty_iter
(decoder: JSONLDecoder[Any] | AsyncJSONLDecoder[Any])
tests/decoders/test_jsonl.py:74
↓ 1 callersFunctionassert_incomplete_partial_input_response
(events: list[ParsedBetaMessageStreamEvent], message: BetaMessage)
tests/lib/streaming/test_beta_messages.py:214
↓ 1 callersFunctionassert_is_file_content
(obj: object, *, key: str | None = None)
src/anthropic/_files.py:35
↓ 1 callersFunctionassert_matches_model
(model: type[BaseModelT], value: BaseModelT, *, path: list[str])
tests/utils.py:28
↓ 1 callersFunctionassert_overloads_in_sync
Ensure that every @overload of overloaded_func contains all params from source_func.
src/anthropic/_utils/_reflection.py:46
↓ 1 callersFunctionasync_client
()
examples/vertex.py:24
↓ 1 callersFunctionasync_read_file_content
(file: FileContent)
src/anthropic/_files.py:121
↓ 1 callersFunctionasync_stream
()
examples/text_completions_streaming.py:29
↓ 1 callersFunctionasync_transform
Transform dictionaries based off of type information from the given type, for example: ```py class Params(TypedDict, total=False): ca
src/anthropic/_utils/_transform.py:299
↓ 1 callersFunctionbackoff
Exponential backoff for ``attempt`` (1-indexed), capped at ``cap``.
src/anthropic/lib/_retry.py:32
↓ 1 callersFunctionbeta_bash_tool
(ctx: AgentToolContext)
src/anthropic/lib/tools/agent_toolset.py:432
↓ 1 callersMethodbuild
( cls: type[_T], *, response: Response, data: object, )
src/anthropic/_types.py:191
↓ 1 callersMethodbuild_request
(options: FinalRequestOptions)
tests/test_client.py:269
↓ 1 callersMethodclear_all_memory
Override the base implementation to provide file system clearing.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:602
↓ 1 callersFunctionclear_locals
(string: str, *, stacklevel: int)
tests/lib/utils.py:61
↓ 1 callersMethodclose
Close the underlying HTTPX client. The client will *not* be usable after this.
src/anthropic/_base_client.py:1785
↓ 1 callersMethodclose
Close the response and release the connection. Automatically called if the response body is read to completion.
src/anthropic/_streaming.py:352
↓ 1 callersMethodclose
(self)
src/anthropic/lib/tools/agent_toolset.py:217
↓ 1 callersMethodclose
(self)
src/anthropic/lib/middleware/_fallbacks.py:1550
↓ 1 callersMethodclose
Close the response and release the connection. Automatically called if the response body is read to completion.
src/anthropic/lib/streaming/_beta_messages.py:233
↓ 1 callersMethodclose
Close the response and release the connection. Automatically called if the response body is read to completion.
src/anthropic/lib/streaming/_messages.py:229
↓ 1 callersMethodclose_open_blocks
content_block_stop events for any blocks still open.
src/anthropic/lib/middleware/_fallbacks.py:1242
↓ 1 callersFunctioncoerce_float
(val: str)
src/anthropic/_utils/_utils.py:332
↓ 1 callersFunctioncoerce_integer
(val: str)
src/anthropic/_utils/_utils.py:328
↓ 1 callersFunctioncollect_helpers
Collect deduplicated helper names from tools and messages.
src/anthropic/lib/_stainless_helpers.py:97
↓ 1 callersFunctionconversation_loop
()
examples/memory/basic.py:70
↓ 1 callersMethodcopy
Create a new client instance re-using the same options given to the current client with optional overriding.
src/anthropic/lib/bedrock/_client.py:421
↓ 1 callersMethodcopy
Create a new client re-using the current options, with optional overrides. See ``AnthropicGoogleCloud.copy`` for the override semantics.
src/anthropic/lib/google_cloud/_client.py:604
↓ 1 callersMethodcreate
Create a new memory file with the specified content.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:252
↓ 1 callersMethoddefault
(self, o: Any)
src/anthropic/_utils/_json.py:30
↓ 1 callersMethoddelete
Delete a memory file or directory.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:154
↓ 1 callersMethoddelete
Delete a memory file or directory.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:267
↓ 1 callersMethoddelta
Apply a content_block_delta to its accumulating block, shifting `event["index"]`.
src/anthropic/lib/middleware/_fallbacks.py:1221
↓ 1 callersFunctiondownload_session_skills
Download the session agent's skills into ``{workdir}/skills/<name>/``. Looks up the session's resolved agent, and for each skill fetches its file
src/anthropic/lib/tools/_skills.py:188
↓ 1 callersMethodexecute
Execute a memory command and return the result. This method dispatches to the appropriate handler method based on the command type (v
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:221
↓ 1 callersFunctionfield_outer_type
(field: FieldInfo)
src/anthropic/_compat.py:104
↓ 1 callersFunctionfile_metadata_body
()
tests/test_middleware.py:366
↓ 1 callersFunctionfill
(target: Dict[str, Any], key: str, env_var: str)
src/anthropic/lib/credentials/_providers.py:93
↓ 1 callersFunctionfind_breaking_changes
( new_obj: griffe.Object | griffe.Alias, old_obj: griffe.Object | griffe.Alias, *, path: list[
scripts/detect-breaking-changes.py:23
↓ 1 callersFunctionfinish_fragment
()
scripts/utils/ruffen-docs.py:56
↓ 1 callersFunctionformat_file
( filename: str, skip_errors: bool, )
scripts/utils/ruffen-docs.py:122
↓ 1 callersFunctionformat_str
( src: str, )
scripts/utils/ruffen-docs.py:33
↓ 1 callersMethodgenerate_tool_call_response
Generate a MessageParam by calling tool functions with any tool use blocks from the last message. Note the tool call response is cached, repe
src/anthropic/lib/tools/_beta_runner.py:594
↓ 1 callersFunctionget_architecture
()
src/anthropic/_base_client.py:2516
↓ 1 callersFunctionget_async_library
()
src/anthropic/_utils/_utils.py:403
↓ 1 callersFunctionget_caller_name
(*, stacklevel: int = 1)
tests/lib/utils.py:50
↓ 1 callersMethodget_final_message
Waits until the stream has been read to completion and returns the accumulated `Message` object.
src/anthropic/lib/streaming/_beta_messages.py:92
↓ 1 callersMethodget_final_message
Waits until the stream has been read to completion and returns the accumulated `Message` object.
src/anthropic/lib/streaming/_beta_messages.py:241
↓ 1 callersMethodget_final_message
Waits until the stream has been read to completion and returns the accumulated `Message` object.
src/anthropic/lib/streaming/_messages.py:237
↓ 1 callersFunctionget_model_config
(model: type[pydantic.BaseModel])
src/anthropic/_compat.py:110
↓ 1 callersFunctionget_platform
()
src/anthropic/_base_client.py:2436
↓ 1 callersFunctionget_python_runtime
()
src/anthropic/_base_client.py:2502
↓ 1 callersFunctionget_python_version
()
src/anthropic/_base_client.py:2509
↓ 1 callersFunctionget_response_stream_shape
()
src/anthropic/lib/bedrock/_stream_decoder.py:15
↓ 1 callersMethodhandle
(self, request: APIRequest, call_next: CallNext)
src/anthropic/lib/middleware/_fallbacks.py:174
↓ 1 callersMethodhandle
(self, request: APIRequest, call_next: CallNext)
tests/test_middleware.py:234
↓ 1 callersMethodhandle_async
(self, request: APIRequest, call_next: AsyncCallNext)
tests/test_middleware.py:238
↓ 1 callersFunctionhuman_join
(seq: Sequence[str], *, delim: str = ", ", final: str = "or")
src/anthropic/_utils/_utils.py:207
↓ 1 callersMethodid
(self)
src/anthropic/_streaming.py:385
↓ 1 callersMethodinsert
Insert text at a specific line number in a memory file.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:262
↓ 1 callersFunctionis_ipv4_hostname
(hostname: str)
src/anthropic/_utils/_httpx.py:16
↓ 1 callersFunctionis_ipv6_hostname
(hostname: str)
src/anthropic/_utils/_httpx.py:24
↓ 1 callersFunctionis_typevar
(typ: type)
src/anthropic/_utils/_typing.py:48
↓ 1 callersMethoditer_pages
(self: SyncPageT)
src/anthropic/_base_client.py:278
↓ 1 callersMethoditer_pages
(self: AsyncPageT)
src/anthropic/_base_client.py:358
↓ 1 callersFunctionjitter
Uniform random delay in ``[low, high)`` — spreads out retry storms.
src/anthropic/lib/_retry.py:37
↓ 1 callersMethodjson
(self, **kwargs: Any)
src/anthropic/_legacy_response.py:434
↓ 1 callersFunctionjson_safe
Translates a mapping / sequence recursively in the same fashion as `pydantic` v2's `model_dump(mode="json")`.
src/anthropic/_utils/_utils.py:420
↓ 1 callersFunctionload_auth
(*, project_id: str | None)
src/anthropic/lib/vertex/_auth.py:17
↓ 1 callersFunctionload_default_credentials
Load Application Default Credentials with the ``cloud-platform`` scope and mint an initial access token. Returns the credentials object and t
src/anthropic/lib/_extras/_google_auth.py:46
↓ 1 callersFunctionload_fixture
Load a fixture file from the fixtures directory.
tests/lib/streaming/helpers.py:10
↓ 1 callersFunctionlru_cache
A version of functools.lru_cache that retains the type signature for the wrapped function arguments.
src/anthropic/_utils/_utils.py:410
↓ 1 callersFunctionmain
()
scripts/detect-breaking-changes.py:50
↓ 1 callersFunctionmain
(argv: Sequence[str] | None = None)
scripts/utils/ruffen-docs.py:143
↓ 1 callersFunctionmain
()
examples/web_search_stream.py:6
↓ 1 callersFunctionmain
()
examples/managed-agents-streaming-deltas-manual.py:19
↓ 1 callersFunctionmain
()
examples/agents_comprehensive.py:17
↓ 1 callersFunctionmain
()
examples/agents.py:8
↓ 1 callersFunctionmain
()
examples/text_completions_demo_sync.py:7
↓ 1 callersFunctionmain
()
examples/managed-agents-worker-dispatch.py:48
↓ 1 callersFunctionmain
()
examples/tools_runner.py:44
↓ 1 callersFunctionmain
()
examples/text_completions_demo_async.py:9
↓ 1 callersFunctionmain
()
examples/managed-agents-self-hosted-sandbox-worker.py:54
↓ 1 callersFunctionmain
()
examples/tools_runner_search_tool.py:64
↓ 1 callersFunctionmain
()
examples/messages_stream.py:10
↓ 1 callersFunctionmain
()
examples/tools_stream.py:8
↓ 1 callersFunctionmain
()
examples/fallbacks.py:6
↓ 1 callersFunctionmain
()
examples/mcp_tool_runner.py:22
↓ 1 callersFunctionmain
Primary scenario: drive a session yourself and watch each tool call. No work queue and no lease are involved — we create the session, send a
examples/managed-agents-observe-tool-calls.py:52
← previousnext →701–800 of 4,863, ranked by callers