MCPcopy Create free account

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

Functions13,873 in github.com/anthropics/anthropic-sdk-python

↓ 3 callersFunctionhandler
(_: httpx2.Request)
tests/test_exceptions.py:71
↓ 3 callersMethodhas_next_page
(self)
src/anthropic/pagination.py:37
↓ 3 callersMethodhas_terminated
Late input can make a terminated thread run again.
src/anthropic/lib/tools/_beta_session_runner.py:718
↓ 3 callersFunctionimage_block
(data: object)
tests/test_prepare.py:125
↓ 3 callersFunctionindex_runnables
Index a runner's tools by `name` and its toolsets by family (`toolset_name`). A toolset's `tools[]` entry has no `name`, so toolsets are indexed
src/anthropic/lib/tools/_tool_dispatch.py:160
↓ 3 callersFunctionis_basemodel_type
(type_: type)
src/anthropic/_models.py:623
↓ 3 callersMethodis_denied
(self)
src/anthropic/lib/tools/_beta_session_runner.py:855
↓ 3 callersFunctionis_download_change
(change: StateChange)
src/anthropic/lib/tools/_toolsets/_render.py:203
↓ 3 callersMethodis_enabled
Whether the member is offered to the model and may be dispatched.
src/anthropic/lib/tools/_toolsets/_base.py:209
↓ 3 callersFunctionis_file_content
(obj: object)
src/anthropic/_files.py:29
↓ 3 callersFunctionis_tuple_t
(obj: _TupleT | object)
src/anthropic/_utils/_utils.py:174
↓ 3 callersFunctionis_type_alias_type
Return whether the provided argument is an instance of `TypeAliasType`. ```python type Int = int is_type_alias_type(Int) # > True
src/anthropic/_utils/_typing.py:59
↓ 3 callersMethodis_unconfirmed
(self)
src/anthropic/lib/tools/_beta_session_runner.py:858
↓ 3 callersFunctionjson_response
(body: Any, status: int)
tests/lib/test_refusal_fallback_streaming.py:101
↓ 3 callersFunctionlisting_interrupted_by
Run `interrupt` once while a sync's server listing is being consumed: right after the sync has processed `after_items` listed memories, or onc
tests/lib/tools/memory_sync/conftest.py:43
↓ 3 callersFunctionliteral_values
(tp: Any)
tests/test_open_telemetry.py:8251
↓ 3 callersFunctionlog_safe
A model- or page-supplied name for a log record or an SDK-written error text: `one_line`, cut short.
src/anthropic/lib/tools/_toolsets/_sanitize.py:64
↓ 3 callersFunctionmake_async_bedrock_client
(**kwargs: Any)
tests/test_middleware.py:1920
↓ 3 callersFunctionmake_async_mantle_client
(**kwargs: Any)
tests/test_middleware.py:1936
↓ 3 callersFunctionmake_bedrock_client
(**kwargs: Any)
tests/test_middleware.py:1916
↓ 3 callersFunctionmake_mantle_client
(**kwargs: Any)
tests/test_middleware.py:1932
↓ 3 callersFunctionmake_message
(message_cls: type[Union[Message, BetaMessage]])
tests/types/test_to_param.py:47
↓ 3 callersFunctionmake_vertex_client
(**kwargs: Any)
tests/test_middleware.py:1924
↓ 3 callersFunctionmalformed_stream_events
(message: dict[str, Any])
tests/test_open_telemetry.py:7745
↓ 3 callersFunctionmap_aiohttp_exceptions
()
src/anthropic/_vendor/httpx_aiohttp/transport.py:47
↓ 3 callersFunctionmcp_resource_to_file
Convert MCP resource contents to a file tuple for `files.upload()`. Returns a `(filename, content_bytes, mime_type)` tuple compatible with th
src/anthropic/lib/tools/mcp.py:277
↓ 3 callersFunctionmessage_with
`MESSAGE` with `iterations` in its usage.
tests/test_open_telemetry.py:738
↓ 3 callersFunctionmock_session_routes
(respx_mock: MockRouter)
tests/test_open_telemetry.py:3713
↓ 3 callersMethodnext_page_info
(self)
src/anthropic/_base_client.py:243
↓ 3 callersFunctionnot_found
(tool_use_id: str)
tests/lib/tools/test_runner_eager_tools.py:855
↓ 3 callersFunctionopen_regular_file
(rel_path: str, dest: Path)
src/anthropic/lib/tools/_file_store.py:333
↓ 3 callersFunctionopenapi_model_dump
Dump a model as it is sent in a request body, without the fields named in `__api_exclude__`.
src/anthropic/_utils/_json.py:53
↓ 3 callersMethodoutcome
(self, heartbeat: Request)
tests/lib/environments/test_worker_properties.py:117
↓ 3 callersFunctionparse_beta_response
( *, output_format: ResponseFormatT | NotGiven, response: BetaMessage, )
src/anthropic/lib/_parse/_response.py:23
↓ 3 callersFunctionparse_input
Parse the model's `tool_use.input` into the member's input model. A mistyped field is the model's mistake, so it comes back as a `ToolError` the
src/anthropic/lib/tools/_toolsets/_base.py:500
↓ 3 callersFunctionplatform_client
(platform: str, sync: bool, requests: list[httpx2.Request] | None = None)
tests/lib/test_platform_resources.py:55
↓ 3 callersMethodpost
Returns `result`, or the error result that the API accepted in its place, and whether it was accepted.
src/anthropic/lib/tools/_beta_session_runner.py:996
↓ 3 callersMethodread
Read and return the binary response content.
src/anthropic/_response.py:474
↓ 3 callersMethodread
()
tests/test_open_telemetry.py:1942
↓ 3 callersFunctionread_text_exact
Read a UTF-8 file without newline translation.
src/anthropic/lib/tools/_files.py:13
↓ 3 callersFunctionrealpath_lenient
`path` made absolute with every existing symlink resolved and `..` collapsed. Components that do not exist yet (a download directory to be created
src/anthropic/lib/tools/_toolsets/_security.py:36
↓ 3 callersFunctionrecording_exit
(api: FakeApi, name: str)
tests/lib/environments/_schedules.py:260
↓ 3 callersFunctionreject_unrestricted_paths
Raise `TypeError` if the deprecated `unrestricted_paths` was passed at all.
src/anthropic/lib/tools/_deprecations.py:22
↓ 3 callersFunctionrender_result
The content blocks for a member's result, by the registry's result kind. A pure action renders as its fixed acknowledgment, then, in a text block
src/anthropic/lib/tools/_toolsets/_render.py:110
↓ 3 callersFunctionreply_ending
A reply that ends for another reason.
tests/lib/tools/test_runner_eager_tools.py:845
↓ 3 callersFunctionresponse_data
What the call's response gave: the parsed body or the stream, or the decoded body of a raw response. A raw response whose body the application ha
src/anthropic/_tracing.py:680
↓ 3 callersFunctionrun_and_check
(steps: list[Step], workers: tuple[str, ...] = WORKERS, **options: Any)
tests/lib/environments/test_worker_properties.py:256
↓ 3 callersFunctionsecret_of
(token: str)
tests/lib/environments/_fake_work_api.py:531
↓ 3 callersFunctionstart
(event_id: str)
tests/lib/sessions/test_accumulate.py:26
↓ 3 callersMethodstart
(cls, workdir: str | os.PathLike[str], *, env: Optional[Mapping[str, str]] = None)
src/anthropic/lib/tools/agent_toolset.py:521
↓ 3 callersMethodstart
Starts the span of `work_item`. Never raises: an item whose span cannot start is handled without one.
src/anthropic/lib/_tracing/_work.py:32
↓ 3 callersMethodstop
Track a content_block_stop, shifting `event["index"]`.
src/anthropic/lib/middleware/_fallbacks.py:1309
↓ 3 callersMethodstopped_by_app_at
(self, session: FakeSession)
tests/lib/tools/test_session_runner_properties.py:179
↓ 3 callersMethodstream
Like `send()`, and returns the reply's stream. The turn is in progress until the stream ends or is closed.
src/anthropic/lib/threads/_beta_threads.py:226
↓ 3 callersMethodtab
(self, tab_id: str | None)
tests/lib/tools/toolsets/_fakes.py:86
↓ 3 callersFunctiontool_addition
(definition: BetaToolUnionParam)
tests/lib/threads/helpers.py:200
↓ 3 callersFunctiontool_results
(message: BetaMessageParam | None)
tests/lib/tools/test_runner_eager_tools.py:873
↓ 3 callersFunctiontrace_headers
The headers that carry `span`'s trace context, from the propagator the application registered. Empty when the propagator cannot be loaded or fail
src/anthropic/_tracing.py:878
↓ 3 callersFunctiontypes
(events: list[Event])
tests/lib/tools/test_fake_sessions_api.py:49
↓ 3 callersMethodunhandled
(self, session: FakeSession)
tests/lib/tools/test_session_runner_properties.py:193
↓ 3 callersFunctionunion_members
The classes of a union, a list of them, or one class, however nested or annotated.
tests/test_open_telemetry.py:8235
↓ 3 callersMethodup_to_date
(self, session: FakeSession)
tests/lib/tools/test_session_runner_properties.py:183
↓ 3 callersFunctionurl_context
(record: CallRecord)
src/anthropic/lib/tools/_toolsets/_pipeline.py:302
↓ 3 callersMethodwait
(self, context: BetaToolsetCallContext, input: Any)
tests/lib/tools/toolsets/test_pipeline.py:1122
↓ 3 callersMethodwait_closed
An event loop closes what was dropped once it gets to run, and one generator after the other.
tests/utils.py:215
↓ 3 callersFunctionwork_json
(item: Item)
tests/lib/environments/_fake_work_api.py:535
↓ 3 callersFunctionworker
(client: AsyncAnthropic, **options: Any)
tests/lib/environments/test_worker.py:620
↓ 3 callersMethodworker
()
tests/lib/test_credentials.py:1800
↓ 3 callersFunctionwrite_text_exact
Write a UTF-8 file without newline translation.
src/anthropic/lib/tools/_files.py:18
↓ 2 callersMethod__aenter__
(self)
src/anthropic/_streaming.py:261
↓ 2 callersMethod__aenter__
(self)
src/anthropic/lib/tools/_file_store.py:129
↓ 2 callersMethod__anext__
(self)
src/anthropic/lib/tools/_beta_runner.py:1162
↓ 2 callersMethod__class__
(self)
src/anthropic/_utils/_proxy.py:48
↓ 2 callersMethod__decode__
(self)
src/anthropic/_decoders/jsonl.py:50
↓ 2 callersMethod__enter__
(self)
src/anthropic/_streaming.py:132
↓ 2 callersMethod__exit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, tb: TracebackType | None
src/anthropic/lib/tools/_toolsets/_runnable.py:129
↓ 2 callersMethod__init__
( self, *, raw: httpx2.Response, cast_to: type[R], client: BaseClient[
src/anthropic/_response.py:63
↓ 2 callersMethod__init__
( self, *, resource: str | None = None, api_key: str | None = None, az
src/anthropic/lib/foundry.py:95
↓ 2 callersMethod__init__
(self)
tests/test_open_telemetry.py:142
↓ 2 callersMethod__init__
(self, name: str, fn: Callable[[Any], Awaitable[Any]], close: Callable[[], Any] | None = None)
tests/lib/tools/_fake_sessions_api.py:795
↓ 2 callersMethod__init__
(self, *, sync: bool, runner: Any, timeline: list[str], requests: list[Any], desktop: Desktop)
tests/lib/tools/test_runner_eager_tools.py:1072
↓ 2 callersMethod__init__
(self)
tests/lib/tools/toolsets/_fakes.py:47
↓ 2 callersMethod__init__
(self)
tests/lib/tools/toolsets/_computer_fakes.py:36
↓ 2 callersMethod__stream__
(self)
src/anthropic/_streaming.py:82
↓ 2 callersMethod__stream__
(self)
tests/test_streaming.py:255
↓ 2 callersFunction_active_profile
Resolve the active profile name. `ANTHROPIC_PROFILE` env var → `<config_dir>/active_config` pointer file → `"default"` literal. The resolved
src/anthropic/lib/credentials/_constants.py:94
↓ 2 callersMethod_adopt_container
Continue in the container of `reply` on later turns, unless the thread already names one: container-bound server tools reject a follow-up requ
src/anthropic/lib/threads/_thread_state.py:332
↓ 2 callersFunction_append_header_value
Append `addition` to a comma-separated header value, skipping tokens that are already present so the same helper isn't recorded twice. Values
src/anthropic/_base_client.py:2789
↓ 2 callersMethod_append_tool_results
Add `results` right after the reply, where the API takes them, ahead of messages added to the thread while it was handled.
src/anthropic/lib/tools/_beta_runner.py:462
↓ 2 callersMethod_applicable_body
The request's JSON body when this middleware applies to it, `None` otherwise.
src/anthropic/lib/middleware/_fallbacks.py:344
↓ 2 callersMethod_apply
(self, request: httpx2.Request, token: str)
src/anthropic/lib/credentials/_auth.py:79
↓ 2 callersMethod_apply
(self, at: float, *step: Any)
tests/lib/environments/_schedules.py:60
↓ 2 callersMethod_apply_listed
(self, ids: Sequence[str])
src/anthropic/lib/tools/_beta_session_runner.py:824
↓ 2 callersFunction_archive_top_dir
Return the single top-level directory shared by every archive entry, or `""` if the entries don't all live under one common directory. Skill
src/anthropic/lib/tools/_skills.py:65
↓ 2 callersFunction_assert_only_files_and_dirs
(root: Path)
tests/lib/tools/test_skills.py:140
↓ 2 callersFunction_assert_reply_params_are_left_off_the_compaction_request_only
( respx_mock: MockRouter, tool_choice: BetaToolChoiceParam, fallbacks: Union[List[BetaFallbackPara
tests/lib/tools/test_runners.py:3329
↓ 2 callersFunction_assert_tool_runner_calls
(calls: List[MockRequestCall])
tests/lib/test_vertex.py:137
↓ 2 callersFunction_assert_tool_runner_calls
(calls: t.List[MockRequestCall])
tests/lib/test_bedrock.py:766
↓ 2 callersFunction_async_atomic_write_file
(target_path: AsyncPath, content: str)
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:628
↓ 2 callersFunction_async_refusal
The same as `_refusal`, for a call on the async class.
tests/lib/tools/toolsets/test_refusals.py:37
← previousnext →801–900 of 13,873, ranked by callers