MCPcopy Create free account

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

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

↓ 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
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 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 callersFunctiondrive
()
tests/lib/tools/test_session_runner.py:532
↓ 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 callersFunctionfind_breaking_changes
( new_obj: griffe.Object | griffe.Alias, old_obj: griffe.Object | griffe.Alias, *, path: list[
scripts/detect-breaking-changes.py:23
↓ 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 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 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:18
↓ 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
↓ 1 callersFunctionmain
()
examples/agents_with_files.py:9
↓ 1 callersFunctionmake_stream_iterator
( content: Iterator[bytes], *, sync: bool, client: Anthropic, async_client: AsyncAnthropic
tests/test_streaming.py:284
↓ 1 callersFunctionmake_tool_searcher
Returns a tool that Claude can use to search through all available tools
examples/tools_runner_search_tool.py:47
↓ 1 callersFunctionmy_iter
()
tests/test_transform.py:426
↓ 1 callersMethodnote_event
Arm the clock on an ``end_turn`` idle, disarm it on anything else.
src/anthropic/lib/tools/_beta_session_runner.py:143
↓ 1 callersFunctionparse_date
(value: date | StrBytesIntFloat)
src/anthropic/_compat.py:24
↓ 1 callersFunctionparse_datetime
(value: Union[datetime, StrBytesIntFloat])
src/anthropic/_compat.py:27
↓ 1 callersMethodparsed_snapshot
(self)
src/anthropic/lib/streaming/_types.py:32
↓ 1 callersFunctionplatform_headers
(version: str, *, platform: Platform | None)
src/anthropic/_base_client.py:2479
↓ 1 callersMethodplatform_headers
(self)
src/anthropic/_base_client.py:763
↓ 1 callersMethodpoller
Async-iterate work items claimed from a self-hosted environment. Each yielded item has been ack'd. The environment key authenticates the
src/anthropic/resources/beta/environments/work.py:1113
↓ 1 callersFunctionprofile_to_ini
Convert an AWS config profile to an INI format string.
tests/lib/test_bedrock.py:36
↓ 1 callersFunctionpush
(line: str)
src/anthropic/lib/tools/agent_toolset.py:680
↓ 1 callersFunctionread_file_content
(file: FileContent)
src/anthropic/_files.py:79
↓ 1 callersFunctionrefresh_auth
(credentials: Credentials)
src/anthropic/lib/vertex/_auth.py:41
↓ 1 callersMethodrename
Rename or move a memory file or directory.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:272
↓ 1 callersMethodretrieve
This endpoint is idempotent and can be used to poll for Message Batch completion. To access the results of a Message Batch, make a re
src/anthropic/resources/beta/messages/batches.py:112
↓ 1 callersMethodretrieve
This endpoint is idempotent and can be used to poll for Message Batch completion. To access the results of a Message Batch, make a re
src/anthropic/resources/beta/messages/batches.py:508
↓ 1 callersMethodretrieve
This endpoint is idempotent and can be used to poll for Message Batch completion. To access the results of a Message Batch, make a re
src/anthropic/resources/messages/batches.py:96
↓ 1 callersMethodretrieve
This endpoint is idempotent and can be used to poll for Message Batch completion. To access the results of a Message Batch, make a re
src/anthropic/resources/messages/batches.py:406
↓ 1 callersFunctionrich_print_str
Like `rich.print()` but returns the string instead
tests/lib/utils.py:66
↓ 1 callersFunctionrun_runnable_tool
Call ``tool`` with ``input``, awaiting the result if the tool is async. Bridges the sync (:class:`~anthropic.lib.tools.BetaFunctionTool`) and asy
src/anthropic/lib/tools/_tool_dispatch.py:60
↓ 1 callersMethodsetup_skills
Download the session agent's skills into ``{workdir}/skills/<name>/``. No-op unless both :attr:`client` and :attr:`session_id` are set. The
src/anthropic/lib/tools/agent_toolset.py:222
↓ 1 callersFunctionskeleton
Compact structural skeleton of a spliced stream — no text content.
tests/lib/test_refusal_fallback_streaming.py:166
↓ 1 callersFunctionstainless_helper_header
Build x-stainless-helper header dict from tools and messages. Returns an empty dict if no helpers are found.
src/anthropic/lib/_stainless_helpers.py:128
← previousnext →701–800 of 4,447, ranked by callers