MCPcopy Create free account

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

Functions12,274 in github.com/anthropics/anthropic-sdk-python

↓ 1 callersFunctionbuild_wire_configs
The caller's `configs`, deep-copied, with `enabled: false` added for every member that is not served. Enabling such a member is a configuration er
src/anthropic/lib/tools/_toolsets/_base.py:473
↓ 1 callersMethodcall
Execute member `name` with the raw `tool_use.input` and return the tool-result content. Raise `anthropic.lib.tools.ToolError` for a model-visi
src/anthropic/lib/tools/_toolsets/_runnable.py:112
↓ 1 callersMethodcall
( self, context: BetaToolsetCallContext, name: str, input: Mapping[str, object] )
src/anthropic/lib/tools/_toolsets/_runnable.py:157
↓ 1 callersMethodcall
(self, input: object)
tests/lib/tools/test_open_telemetry.py:860
↓ 1 callersMethodcall_tool
(self, name: str, arguments: dict[str, Any] | None = None)
tests/lib/tools/test_mcp_tool.py:62
↓ 1 callersFunctioncarry_helper_tag
Return `params` carrying `source`'s helper tag, so the tag survives serializing a tagged object.
src/anthropic/lib/_stainless_helpers.py:108
↓ 1 callersFunctioncheck_flavour
Raise when one of toolset class `cls`'s methods `names` is written for the other flavour: `async def` on the synchronous toolset, where nothing wo
src/anthropic/lib/tools/_toolsets/_base.py:453
↓ 1 callersFunctioncheck_metadata
(archive: str, metadata: bytes, expected: tuple[list[str], str])
scripts/utils/check-dist.py:104
↓ 1 callersFunctioncheck_sdist
(path: Path, package: str, committed: dict[str, Committed])
scripts/utils/check-dist.py:236
↓ 1 callersFunctioncheck_wheel
(path: Path, package: str, pyproject: dict[str, Any], committed: dict[str, Committed])
scripts/utils/check-dist.py:211
↓ 1 callersFunctionchecked_error
`error` with each text block run through `check` and then bounded, or the same object when nothing changed. The bound comes after the check, so th
src/anthropic/lib/tools/_toolsets/_base.py:551
↓ 1 callersMethodclear_all_memory
Override the base implementation to provide file system clearing.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:620
↓ 1 callersFunctionclear_locals
(string: str, *, stacklevel: int)
tests/lib/utils.py:61
↓ 1 callersMethodclient
(self)
tests/lib/test_bedrock_mantle.py:684
↓ 1 callersMethodclose
Close the underlying HTTPX client. The client will *not* be usable after this.
src/anthropic/_base_client.py:1923
↓ 1 callersMethodclose
Close the response and release the connection. Automatically called if the response body is read to completion.
src/anthropic/_streaming.py:272
↓ 1 callersMethodclose
Stop the runner early and end its span. Use it when you won't resume the runner with `until_done()`. Iterating a closed runner yields nothing
src/anthropic/lib/tools/_beta_runner.py:648
↓ 1 callersMethodclose
(self)
src/anthropic/lib/tools/agent_toolset.py:301
↓ 1 callersMethodclose
Release any resource the toolset holds (a browser, a socket, a subprocess) when you are done with it. The tool runner never closes a toolset,
src/anthropic/lib/tools/_toolsets/_runnable.py:117
↓ 1 callersMethodclose
Release any resource the toolset holds when you are done with it. The tool runner never closes a toolset. The default only marks the toolset c
src/anthropic/lib/tools/_toolsets/_runnable.py:161
↓ 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:265
↓ 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:253
↓ 1 callersMethodclose
Close the response body stream. This is called automatically if you consume the entire stream.
src/anthropic/_decoders/jsonl.py:43
↓ 1 callersMethodclose
(self)
tests/lib/tools/toolsets/_stubs.py:86
↓ 1 callersFunctionclose_credentials
Release any resources owned by a credential provider, if it exposes `close()`.
src/anthropic/lib/credentials/_close.py:33
↓ 1 callersMethodclose_open_blocks
content_block_stop events for any blocks still open.
src/anthropic/lib/middleware/_fallbacks.py:1320
↓ 1 callersFunctionclose_what_earlier_tests_left_suspended
Closes the generators that earlier tests of this process walked away from, such as a tool runner's. Python closes one when it frees it, which can
tests/test_open_telemetry.py:8198
↓ 1 callersFunctioncloser
()
tests/lib/tools/toolsets/test_pipeline.py:1243
↓ 1 callersFunctioncoerce_float
(val: str)
src/anthropic/_utils/_utils.py:355
↓ 1 callersFunctioncoerce_integer
(val: str)
src/anthropic/_utils/_utils.py:351
↓ 1 callersMethodcollect_from
(self, chunk: bytes)
src/anthropic/lib/tools/_files.py:55
↓ 1 callersFunctioncollect_helpers
Collect deduplicated helper names from tools and messages.
src/anthropic/lib/_stainless_helpers.py:118
↓ 1 callersFunctioncommitted_files
()
scripts/utils/check-dist.py:51
↓ 1 callersFunctioncompaction
The block that a compaction request is answered with.
tests/lib/tools/test_runner_eager_tools.py:835
↓ 1 callersFunctioncompleted
(world: World)
tests/lib/tools/toolsets/test_enforcement.py:277
↓ 1 callersFunctionconfirmation_text
Fill a pure action's template from its input in a single pass, so a model-supplied value such as `"{ref}"` stays data and is never re-read as a pl
src/anthropic/lib/tools/_toolsets/_render.py:85
↓ 1 callersFunctionconstruct_type_or_none
Like `construct_type_unchecked()`, but returns `None` instead of raising.
src/anthropic/_models.py:661
↓ 1 callersFunctionconsume
(item: Any)
tests/lib/environments/test_poller_method.py:635
↓ 1 callersFunctioncontent_parts
The parts of `content`, a string or a list of content blocks.
src/anthropic/lib/_tracing/_content.py:289
↓ 1 callersFunctionconversation_attributes
The ID of the Session thread in the call's path as the conversation's ID: a Session thread is a conversation.
src/anthropic/_tracing.py:868
↓ 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:228
↓ 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:409
↓ 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:629
↓ 1 callersFunctioncopy_items
Copies the items into a list, scheduling a visit to the slots whose item may need preparing itself.
src/anthropic/_utils/_prepare.py:171
↓ 1 callersFunctioncopy_mapping
Copies the `Mapping` into a dict without its `NotGiven` / `Omit` entries. Schedules a visit to the slots of the copy whose value may need prepari
src/anthropic/_utils/_prepare.py:151
↓ 1 callersFunctioncopy_of_scoped
(parent: ClientT)
tests/lib/test_scoped_client.py:283
↓ 1 callersMethodcreate
Create a new memory file with the specified content.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:254
↓ 1 callersFunctioncut_off_lines
()
tests/lib/tools/memory_sync/test_final_flush.py:153
↓ 1 callersFunctioncut_text
The longest start of `content` whose JSON, without its quotes, is within `room` bytes of UTF-8.
src/anthropic/lib/_tracing/_content.py:253
↓ 1 callersMethoddefault
(self, o: Any)
src/anthropic/_utils/_json.py:62
↓ 1 callersMethoddelete
Delete a memory file or directory.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:156
↓ 1 callersMethoddelete
Delete a memory file or directory.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:269
↓ 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:1299
↓ 1 callersFunctiondialog_lines
One line per dismissed dialog the driver reported (`A confirm dialog "…" was dismissed.`), the message capped and at most a few lines, then a coun
src/anthropic/lib/tools/_toolsets/_render.py:175
↓ 1 callersFunctiondownload_dir_conflicts
Whether `download_dir` is inside (or contains) an upload root, which opens the download-then-upload loop: a page-triggered download written into a
src/anthropic/lib/tools/_toolsets/_security.py:145
↓ 1 callersFunctionend_api_call_span_when_body_ends
Ends the call span when the application has read, closed or dropped the body of `response`. A body that was read before the call returned ends th
src/anthropic/_tracing.py:438
↓ 1 callersFunctionend_tool_use_span
Ends the span with the run's result. An error result fails it with `tool_error`, and none leaves its status unset. Never raises.
src/anthropic/lib/_tracing/_tools.py:188
↓ 1 callersFunctionenv_max_content_bytes
The `max_content_bytes` that the environment sets, or `None` when its value is not valid. A valid value is ASCII decimal digits, with or without
src/anthropic/_tracing.py:216
↓ 1 callersFunctionenv_open_telemetry
The option that the environment variables make, for a client that is given no `open_telemetry` option. It has only what a variable changes from t
src/anthropic/_tracing.py:197
↓ 1 callersFunctionerror_type
The `error.type` of a failed operation: the type of the API's error envelope, or else the status code.
src/anthropic/_tracing.py:765
↓ 1 callersFunctionerrors
(change: dict[str, Any])
tests/lib/tools/toolsets/test_surface.py:153
↓ 1 callersFunctionevent
(name: str, data: dict[str, Any])
tests/lib/tools/toolsets/test_runner.py:80
↓ 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:110
↓ 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:223
↓ 1 callersMethodexecute
Dispatch one member call to its method. Override it, calling `super().execute(context, name, input)`, for before/after hooks around every memb
src/anthropic/lib/tools/_toolsets/_computer.py:198
↓ 1 callersMethodexecute
Dispatch one member call to its method; see the synchronous class's `execute`. Members are async here; one written sync is a contract error.
src/anthropic/lib/tools/_toolsets/_computer.py:317
↓ 1 callersMethodexecute
Dispatch one member call to its method. Override it, calling `super().execute(context, name, input)`, for before/after hooks around every mem
src/anthropic/lib/tools/_toolsets/_browser.py:314
↓ 1 callersMethodexecute
Dispatch one member call to its method. See the synchronous class's `execute`. Members are async here, and one written sync is a contract erro
src/anthropic/lib/tools/_toolsets/_browser.py:565
↓ 1 callersMethodexecute
(self, context: BetaToolsetCallContext, name: Any, input: Any)
tests/lib/tools/toolsets/test_computer_pipeline.py:443
↓ 1 callersFunctionexpand
(text: str)
tests/lib/tools/toolsets/test_pipeline.py:857
↓ 1 callersFunctionexpected_metadata
The header lines, in any order, and the description
scripts/utils/check-dist.py:77
↓ 1 callersMethodextract
(self, carrier: Any, context: Context | None = None, getter: Any = None)
tests/test_open_telemetry.py:7917
↓ 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:464
↓ 1 callersFunctionfailing
(send: Any)
tests/lib/tools/memory_sync/test_lost_response.py:43
↓ 1 callersFunctionfetch_token_from_my_auth_service
(*, force_refresh: bool = False)
examples/workload_identity.py:168
↓ 1 callersFunctionfile_metadata_body
()
tests/test_middleware.py:367
↓ 1 callersFunctionfill
(target: Dict[str, Any], key: str, env_var: str)
src/anthropic/lib/credentials/_providers.py:94
↓ 1 callersFunctionfinal_text
The text that the stream helper of a client of `spans` accumulates.
tests/test_open_telemetry.py:7948
↓ 1 callersFunctionfind_breaking_changes
( new_obj: griffe.Object | griffe.Alias, old_obj: griffe.Object | griffe.Alias, *, path: list[
scripts/detect-breaking-changes.py:59
↓ 1 callersMethodfinish
Render the call's outcome with the browser state the driver just reported. On success the content is the member's rendering plus the `browser
src/anthropic/lib/tools/_toolsets/_pipeline.py:168
↓ 1 callersMethodform
The multipart content that `body` is sent as next to a file.
tests/test_prepare.py:98
↓ 1 callersFunctionformat_code_blocks
Formats all the given blocks with one run of ruff, as starting ruff takes far longer than formatting a block. Exits if ruff can't format one of t
scripts/utils/ruffen-docs.py:20
↓ 1 callersFunctionfunction_has_argument
Returns whether or not the given function has a specific parameter
src/anthropic/_utils/_reflection.py:24
↓ 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:1314
↓ 1 callersMethodget_api_list
( self, path: str, *, model: Type[object], page: Type[SyncPageT],
src/anthropic/_base_client.py:1741
↓ 1 callersFunctionget_caller_name
(*, stacklevel: int = 1)
tests/lib/utils.py:50
↓ 1 callersMethodget_client
(self)
src/anthropic/_vendor/httpx_aiohttp/transport.py:122
↓ 1 callersMethodget_credentials
(self)
tests/lib/test_aws_auth.py:590
↓ 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:101
↓ 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:273
↓ 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:261
↓ 1 callersFunctionget_model_config
(model: type[pydantic.BaseModel])
src/anthropic/_compat.py:105
↓ 1 callersFunctionget_python_runtime
()
src/anthropic/_base_client.py:2694
↓ 1 callersFunctionget_python_version
()
src/anthropic/_base_client.py:2701
↓ 1 callersFunctionget_response_stream_shape
()
src/anthropic/lib/bedrock/_stream_decoder.py:15
↓ 1 callersFunctionget_tracer
The tracer for a client with the resolved `options`, or `None` when the client has no spans. A client has none when its spans are disabled, which
src/anthropic/_tracing.py:241
↓ 1 callersFunctionget_weather
Lookup the weather for a given city in either celsius or fahrenheit Args: location: The city and state, e.g. San Francisco, CA
tests/lib/tools/test_runners.py:537
↓ 1 callersFunctionget_weather
Lookup the weather for a given city. Args: location: The city, e.g. San Francisco
tests/lib/threads/helpers.py:126
← previousnext →1,501–1,600 of 12,274, ranked by callers