MCPcopy Create free account

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

Functions14,068 in github.com/anthropics/anthropic-sdk-python

↓ 3 callersFunctioncount_accumulated_events
Wraps the stable or the beta `accumulate_event`, which the stream helpers and the spans share, so that the type of each event it takes is added to
tests/test_open_telemetry.py:820
↓ 3 callersMethodcountdown_end
(self, session: FakeSession)
tests/lib/tools/test_session_runner_properties.py:318
↓ 3 callersFunctionderived_url
(template: str, /, **values: str)
src/anthropic/lib/google_cloud/_client.py:179
↓ 3 callersFunctiondig
The value at `path` in `data`, whose every level is a dict or a model. `None` where a level lacks its name.
src/anthropic/_tracing.py:807
↓ 3 callersMethoddo
(self, name: str, context: BetaToolsetCallContext, input: Any)
tests/lib/tools/test_runner_eager_tools.py:1051
↓ 3 callersFunctionevaluated_permission
(event: DispatchedToolUseEvent | None)
src/anthropic/lib/tools/_beta_session_runner.py:892
↓ 3 callersFunctionexchange_federation_assertion
Perform a single RFC 7523 `jwt-bearer` exchange and return the resulting `AccessToken`. This is a one-shot convenience wrapper around `Worklo
src/anthropic/lib/credentials/_workload.py:364
↓ 3 callersMethodexecute
(self, context: BetaToolsetCallContext, name: Any, input: Any)
tests/lib/tools/toolsets/test_computer_interface.py:109
↓ 3 callersFunctionextract_property
Follows `path` through nested mappings. Returns `None` once a value is not a mapping or lacks the next key.
src/anthropic/_utils/_utils.py:426
↓ 3 callersFunctionfamily_call
A call to a tool of the `family` toolset, and the timeline line for when that tool starts.
tests/lib/tools/test_runner_eager_toolsets.py:438
↓ 3 callersMethodfind_symlinks
Every symlink under `under` — listings skip them and reads refuse them, so a caller that must know they exist asks here.
src/anthropic/lib/tools/_file_store.py:178
↓ 3 callersMethodfirst_at
(self, *outcomes: str)
tests/lib/environments/test_worker_properties.py:124
↓ 3 callersMethodget_final_text
Returns all `text` content blocks concatenated together. > [!NOTE] > Currently the API will only respond with a single content block.
src/anthropic/lib/streaming/_messages.py:108
↓ 3 callersMethodget_max_retries
(self, max_retries: int)
src/anthropic/_models.py:1109
↓ 3 callersFunctionhandler
(_request: httpx2.Request)
tests/test_client.py:66
↓ 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:742
↓ 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:879
↓ 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:882
↓ 3 callersMethoditer_bytes
Given an iterator that yields raw binary data, iterate over it & yield every event encountered
src/anthropic/_streaming.py:351
↓ 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:8253
↓ 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_mantle_client
(**kwargs: Any)
tests/test_middleware.py:2196
↓ 3 callersFunctionmake_mantle_client
(**kwargs: Any)
tests/test_middleware.py:2192
↓ 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:2184
↓ 3 callersFunctionmalformed_stream_events
(message: dict[str, Any])
tests/test_open_telemetry.py:7747
↓ 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:3714
↓ 3 callersMethodnext_page_info
(self)
src/anthropic/_base_client.py:245
↓ 3 callersFunctionnot_found
(tool_use_id: str)
tests/lib/tools/test_runner_eager_tools.py:856
↓ 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 callersMethodparse
(self, query: str)
src/anthropic/_qs.py:33
↓ 3 callersFunctionparse_beta_response
( *, output_format: ResponseFormatT | NotGiven, response: BetaMessage, )
src/anthropic/lib/_parse/_response.py:24
↓ 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:1020
↓ 3 callersMethodput
Write `str` (UTF-8) or `bytes` atomically to the file at `rel_path`. Missing directories below the root are created; a missing root is not —
src/anthropic/lib/tools/_file_store.py:135
↓ 3 callersMethodread
Read and return the binary response content.
src/anthropic/_response.py:481
↓ 3 callersMethodread
()
tests/test_open_telemetry.py:1943
↓ 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:846
↓ 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:541
↓ 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:874
↓ 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 callersMethodtransport
(self)
tests/utils.py:212
↓ 3 callersMethodunhandled
(self, session: FakeSession)
tests/lib/tools/test_session_runner_properties.py:195
↓ 3 callersFunctionunion_members
The classes of a union, a list of them, or one class, however nested or annotated.
tests/test_open_telemetry.py:8237
↓ 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
↓ 2 callersMethod__aenter__
(self)
src/anthropic/_streaming.py:263
↓ 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:134
↓ 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:70
↓ 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:803
↓ 2 callersMethod__init__
(self, *, sync: bool, runner: Any, timeline: list[str], requests: list[Any], desktop: Desktop)
tests/lib/tools/test_runner_eager_tools.py:1073
↓ 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:84
↓ 2 callersMethod__stream__
(self)
tests/test_streaming.py:269
↓ 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:96
← previousnext →801–900 of 14,068, ranked by callers