MCPcopy Create free account

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

Functions6,399 in github.com/anthropics/anthropic-sdk-python

↓ 1 callersFunctioncollect_helpers
Collect deduplicated helper names from tools and messages.
src/anthropic/lib/_stainless_helpers.py:97
↓ 1 callersFunctionconsume
()
tests/lib/tools/test_session_runner.py:1317
↓ 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:416
↓ 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:592
↓ 1 callersMethodcreate
Create a new memory file with the specified content.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:253
↓ 1 callersFunctioncut_off_lines
()
tests/lib/tools/memory_sync/test_final_flush.py:153
↓ 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:155
↓ 1 callersMethoddelete
Delete a memory file or directory.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:268
↓ 1 callersMethoddelete
()
src/anthropic/lib/tools/_file_store.py:238
↓ 1 callersMethoddelta
Apply a content_block_delta to its accumulating block, shifting `event["index"]`.
src/anthropic/lib/middleware/_fallbacks.py:1258
↓ 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:222
↓ 1 callersFunctionextract_stream_chunk_type
Given a type like `Stream[T]`, returns the generic type variable `T`. This also handles the case where a concrete subclass is given, e.g. ```
src/anthropic/_streaming.py:498
↓ 1 callersFunctionfield_outer_type
(field: FieldInfo)
src/anthropic/_compat.py:104
↓ 1 callersFunctionfile_metadata_body
()
tests/test_middleware.py:365
↓ 1 callersFunctionfill
(target: Dict[str, Any], key: str, env_var: str)
src/anthropic/lib/credentials/_providers.py:94
↓ 1 callersFunctionfind_breaking_changes
( new_obj: griffe.Object | griffe.Alias, old_obj: griffe.Object | griffe.Alias, *, path: list[
scripts/detect-breaking-changes.py:46
↓ 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:438
↓ 1 callersFunctionget_async_library
()
src/anthropic/_utils/_utils.py:403
↓ 1 callersFunctionget_caller_name
(*, stacklevel: int = 1)
tests/lib/utils.py:50
↓ 1 callersMethodget_client
(self)
src/anthropic/_vendor/httpx_aiohttp/transport.py:121
↓ 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:96
↓ 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:249
↓ 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:245
↓ 1 callersFunctionget_model_config
(model: type[pydantic.BaseModel])
src/anthropic/_compat.py:110
↓ 1 callersFunctionget_python_runtime
()
src/anthropic/_base_client.py:2388
↓ 1 callersFunctionget_python_version
()
src/anthropic/_base_client.py:2395
↓ 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:191
↓ 1 callersMethodhandle
(self, request: APIRequest, call_next: CallNext)
tests/test_middleware.py:233
↓ 1 callersMethodhandle_async
(self, request: APIRequest, call_next: AsyncCallNext)
tests/test_middleware.py:237
↓ 1 callersFunctionhas_upper_bound
(requirement: Requirement)
scripts/utils/check-dependency-caps.py:25
↓ 1 callersMethodheartbeat
Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating se
src/anthropic/resources/beta/environments/work.py:319
↓ 1 callersFunctionhuman_join
(seq: Sequence[str], *, delim: str = ", ", final: str = "or")
src/anthropic/_utils/_utils.py:207
↓ 1 callersMethodinsert
Insert text at a specific line number in a memory file.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:263
↓ 1 callersFunctionis_basemodel
Returns whether or not the given type is either a `BaseModel` or a union of `BaseModel`
src/anthropic/_models.py:533
↓ 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_stream_class_type
TypeGuard for determining whether or not the given type is a subclass of `Stream` / `AsyncStream`
src/anthropic/_streaming.py:492
↓ 1 callersFunctionis_typevar
(typ: type)
src/anthropic/_utils/_typing.py:48
↓ 1 callersMethoditer_pages
(self: SyncPageT)
src/anthropic/_base_client.py:276
↓ 1 callersMethoditer_pages
(self: AsyncPageT)
src/anthropic/_base_client.py:356
↓ 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 callersMethodlist
(self, memory_store_id: str, **kwargs: Any)
tests/lib/tools/memory_sync/test_memory_sync.py:667
↓ 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:73
↓ 1 callersFunctionmain
()
scripts/utils/check-dependency-caps.py:29
↓ 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:23
↓ 1 callersFunctionmain
()
examples/agents_comprehensive.py:17
↓ 1 callersFunctionmain
()
examples/agents.py:8
↓ 1 callersFunctionmain
()
examples/managed-agents-worker-dispatch.py:48
↓ 1 callersFunctionmain
()
examples/tools_runner.py:44
↓ 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 callersFunctionmessage_text
(event: BetaManagedAgentsAgentMessageEvent)
examples/managed-agents-streaming-deltas-manual.py:19
↓ 1 callersFunctionmodel_json
(model: pydantic.BaseModel, *, indent: int | None = None)
src/anthropic/_compat.py:128
↓ 1 callersFunctionmy_iter
()
tests/test_transform.py:426
↓ 1 callersMethodnote_event
Arm the clock on an ``end_turn`` idle, disarm it on anything else. ``user.tool_confirmation`` events are neutral: they signal neither agent
src/anthropic/lib/tools/_beta_session_runner.py:178
↓ 1 callersFunctionon_call
(i: int)
tests/lib/tools/memory_sync/test_e2e_memory.py:138
↓ 1 callersFunctionparse_date
(value: date | StrBytesIntFloat)
src/anthropic/_compat.py:24
↓ 1 callersFunctionparse_date
(value: Union[date, StrBytesIntFloat])
src/anthropic/_utils/_compat.py:40
↓ 1 callersFunctionparse_datetime
(value: Union[datetime, StrBytesIntFloat])
src/anthropic/_compat.py:27
↓ 1 callersMethodparsed_snapshot
(self)
src/anthropic/lib/streaming/_types.py:32
↓ 1 callersMethodpatch
( self, path: str, *, cast_to: Type[ResponseT], body: Body | None = No
src/anthropic/_base_client.py:1492
↓ 1 callersFunctionplatform_headers
(version: str, *, platform: Platform | None)
src/anthropic/_base_client.py:2365
↓ 1 callersMethodplatform_headers
(self)
src/anthropic/_base_client.py:742
↓ 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:1120
↓ 1 callersFunctionprofile_to_ini
Convert an AWS config profile to an INI format string.
tests/lib/test_bedrock.py:44
↓ 1 callersFunctionpublic_members
(obj: griffe.Object | griffe.Alias)
scripts/detect-breaking-changes.py:35
↓ 1 callersFunctionpush
(line: str)
src/anthropic/lib/tools/agent_toolset.py:880
↓ 1 callersMethodrange_is_empty
(self)
src/anthropic/lib/tools/_files.py:49
↓ 1 callersFunctionread_file_content
(file: FileContent)
src/anthropic/_files.py:77
↓ 1 callersMethodrefresh
(self, _request: object)
tests/lib/test_google_cloud.py:58
↓ 1 callersMethodrename
Rename or move a memory file or directory.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:273
↓ 1 callersFunctionresolve_assignment_alias
(obj: griffe.Object | griffe.Alias)
scripts/detect-breaking-changes.py:13
↓ 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:116
↓ 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:512
↓ 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:100
↓ 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:410
↓ 1 callersFunctionrich_print_str
Like `rich.print()` but returns the string instead
tests/lib/utils.py:66
↓ 1 callersFunctionrun_and_time
()
tests/lib/tools/test_session_runner.py:1131
↓ 1 callersFunctionscan
(full: Path)
src/anthropic/lib/tools/agent_toolset.py:889
↓ 1 callersFunctionserve
()
tests/lib/environments/test_worker.py:472
← previousnext →901–1,000 of 6,399, ranked by callers