MCPcopy Create free account

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

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

↓ 1 callersFunctionread_sdist
Readers differ in how they take odd headers, so every byte has to be what plain files give
scripts/utils/check-dist.py:163
↓ 1 callersFunctionread_wheel
Readers go by the directory at the end, by the header before each file or by both, so all of it has to agree
scripts/utils/check-dist.py:125
↓ 1 callersFunctionreconnects
(data: st.DataObject, steps: list[Step])
tests/lib/tools/test_session_runner_properties.py:503
↓ 1 callersFunctionrecord_api_call
Sets the attributes of the call that are not read off its request or its response as they are. Never raises. Returns the observer that records a
src/anthropic/lib/_tracing/_api_call.py:55
↓ 1 callersFunctionrecord_messages_create
Records the response of a `messages.create` call, and in content mode the request's messages too. A streamed Message is recorded from its events
src/anthropic/lib/_tracing/_api_call.py:74
↓ 1 callersMethodrecord_partial_reply
Record a turn whose stream ended after `message_start` and before `message_stop`. The next turn starts a new thread because the server holds e
src/anthropic/lib/threads/_thread_state.py:343
↓ 1 callersMethodrefresh
(self, _request: object)
tests/lib/test_google_cloud.py:58
↓ 1 callersFunctionrefuse
(context: BetaConfirmContext)
tests/lib/tools/toolsets/test_refusals.py:139
↓ 1 callersFunctionrefused
(**options: Any)
tests/lib/tools/toolsets/test_computer_interface.py:271
↓ 1 callersMethodrename
Rename or move a memory file or directory.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:274
↓ 1 callersFunctionrender_browser_state
The `browser_state` block: the driver's tabs as reported with each URL and title folded to one line and held to the API's length limit, and `chang
src/anthropic/lib/tools/_toolsets/_render.py:225
↓ 1 callersFunctionreport_of
The checked `BetaBrowserState` as the `Report` that `finish` renders: its tabs and wire changes as they stand, the SDK's own change kinds set apar
src/anthropic/lib/tools/_toolsets/_pipeline.py:94
↓ 1 callersFunctionreported_names
(repo: Path, *, baseline: dict[str, str], tip: dict[str, str])
tests/test_detect_breaking_changes.py:61
↓ 1 callersFunctionrequest_attributes
What every request of the call has in common. The call span starts with these, so that a sampler sees them.
src/anthropic/_tracing.py:860
↓ 1 callersFunctionrequest_header
The value that the last of `layers` to set the header `name` gives it. An `Omit` there leaves the header out.
src/anthropic/_tracing.py:842
↓ 1 callersFunctionrequest_path
(template: str, /, **values: object)
src/anthropic/lib/vertex/_client.py:426
↓ 1 callersFunctionrequests_of
(make_runner: Callable[[Any, Any], Any])
tests/lib/tools/test_runners.py:3636
↓ 1 callersFunctionrequirement
`text` as hatchling writes it
scripts/utils/check-dist.py:65
↓ 1 callersFunctionresolve_assignment_alias
(obj: griffe.Object | griffe.Alias)
scripts/detect-breaking-changes.py:13
↓ 1 callersFunctionresolve_import
(obj: griffe.Object | griffe.Alias)
scripts/detect-breaking-changes.py:35
↓ 1 callersFunctionresolve_open_telemetry
`option` with `propagation` and every field of its `traces`. The environment variables are for a client that is given no option, `None`: `env_ope
src/anthropic/_tracing.py:154
↓ 1 callersMethodresolve_upload_documents
(self, context: BetaURLContext, document_ids: Sequence[str])
src/anthropic/lib/tools/_toolsets/_security.py:231
↓ 1 callersMethodresolve_upload_documents
(self, context: Any, document_ids: Any)
tests/lib/tools/toolsets/test_enforcement.py:268
↓ 1 callersFunctionresolve_upload_paths
For `file_upload`: run `input.paths` and `input.document_ids` through the file policy before dispatch, so the driver receives what the policy retu
src/anthropic/lib/tools/_toolsets/_pipeline.py:340
↓ 1 callersMethodresolve_upload_paths
(self, context: BetaURLContext, paths: Sequence[str])
src/anthropic/lib/tools/_toolsets/_security.py:228
↓ 1 callersMethodresolve_upload_paths
(self, context: Any, paths: Any)
tests/lib/tools/toolsets/test_confirm.py:77
↓ 1 callersMethodresult
(tool_use_id: str, stdout: str)
tests/test_open_telemetry.py:6063
↓ 1 callersFunctionresult_block_content
(content: object)
src/anthropic/lib/_tracing/_content.py:354
↓ 1 callersFunctionresumed_with
(*calls: Call)
tests/lib/tools/test_session_runner.py:352
↓ 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:141
↓ 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:647
↓ 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:135
↓ 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:576
↓ 1 callersFunctionrich_print_str
Like `rich.print()` but returns the string instead
tests/lib/utils.py:66
↓ 1 callersFunctionrows
()
tests/test_prepare.py:779
↓ 1 callersMethodrun
Poll the environment and service each claimed session until cancelled. Loops forever; cancel the task (or wrap it in `asyncio.wait_for`)
src/anthropic/lib/environments/_worker.py:307
↓ 1 callersFunctionrun_runnable_tool
Call `tool` with `input`, awaiting the result if the tool is async. Sync tools run on a worker thread. If the caller cancels (for example on a
src/anthropic/lib/tools/_tool_dispatch.py:302
↓ 1 callersFunctionrunner
(*args: Any, **options: Any)
tests/lib/tools/test_session_runner_properties.py:600
↓ 1 callersFunctionsame_messages
(a: Sequence[BetaMessageParam], b: Sequence[BetaMessageParam])
src/anthropic/lib/threads/_thread_state.py:631
↓ 1 callersFunctionscan
(full: Path)
src/anthropic/lib/tools/agent_toolset.py:1229
↓ 1 callersFunctionscoped_and_copy
(parent: ClientT)
tests/lib/test_scoped_client.py:326
↓ 1 callersMethodselect
(self, timeout: float | None = None)
tests/lib/tools/_fake_sessions_api.py:1033
↓ 1 callersFunctionserialize_data
The JSON text that `data` is sent as once prepared.
src/anthropic/_utils/_prepare.py:75
↓ 1 callersFunctionserve
(self: Any, context: Any, input: Any)
tests/lib/tools/toolsets/test_computer_interface.py:244
↓ 1 callersFunctionserve_stream
Serves the `stream_events` to each request on a local port, and gives the base URL.
tests/test_open_telemetry.py:654
↓ 1 callersFunctionserver_attributes
(base_url: httpx2.URL)
src/anthropic/_tracing.py:874
↓ 1 callersFunctionset_created_id_attribute
Sets the ID of the object that the call created, from the response field that `span_created_id` names.
src/anthropic/_tracing.py:459
↓ 1 callersMethodset_current
(self, thread: str | None)
src/anthropic/lib/tools/_beta_session_runner.py:960
↓ 1 callersFunctionset_time_to_first_chunk
(span: AnthropicSpan, start_time: int)
src/anthropic/lib/_tracing/_response.py:18
↓ 1 callersFunctionset_url_attributes
Sets the `url.*` attributes for a request to `url`. Of its query, they have only the `query_params`. A query that is content, and the full URL th
src/anthropic/_tracing.py:703
↓ 1 callersMethodsetup_skills
Download the skills of the session's agent and its subagents into `{workdir}/skills/<name>/`. No-op unless `client` is set together with `ses
src/anthropic/lib/tools/agent_toolset.py:335
↓ 1 callersMethodshare_snapshot
(self, reader: SnapshotReader)
src/anthropic/lib/_tracing/_streaming.py:123
↓ 1 callersMethodshould_sample
(self, *args: Any, **kwargs: Any)
tests/test_open_telemetry.py:7909
↓ 1 callersFunctionskeleton
Compact structural skeleton of a spliced stream — no text content.
tests/lib/test_refusal_fallback_streaming.py:184
↓ 1 callersFunctionskill_response
(request: Request)
tests/lib/environments/_fake_work_api.py:556
↓ 1 callersFunctionskills_with_subagents
The first version of a skill wins.
src/anthropic/lib/tools/_skills.py:275
↓ 1 callersFunctionsleep_in_thread
Blocks a worker thread while the virtual clock advances.
tests/lib/environments/_schedules.py:306
↓ 1 callersFunctionsleeping
(seconds: float)
tests/lib/environments/test_worker_properties.py:341
↓ 1 callersFunctionspan_ending_stream
The wrapper of the same kind as `body`, so that the checks of `httpx2.Response` on the kind still hold.
src/anthropic/_tracing.py:628
↓ 1 callersFunctionspan_request_attributes
What `SPAN_ATTRIBUTES` gives the span of the call from its request, for the span to start with. Never raises. A header has the value that the cal
src/anthropic/_tracing.py:780
↓ 1 callersFunctionsse
(event: dict[str, Any])
tests/lib/tools/test_runner_eager_tools.py:961
↓ 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:148
↓ 1 callersMethodstart
Track a content_block_start, shifting `event["index"]`.
src/anthropic/lib/middleware/_fallbacks.py:1287
↓ 1 callersFunctionstart_tool_runner_span
Starts the span of one loop of the Messages tool runner. The runner sets its status and ends it. Never raises: a loop whose span cannot start run
src/anthropic/lib/_tracing/_tools.py:34
↓ 1 callersMethodstart_turn
(self, thread: str = PRIMARY)
tests/lib/tools/_fake_sessions_api.py:313
↓ 1 callersMethodstop
(self)
examples/memory/basic.py:55
↓ 1 callersMethodstr_replace
Replace text in a memory file.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:259
↓ 1 callersMethodstream_closed
(self, session: FakeSession, stream: Connection)
tests/lib/tools/_fake_sessions_api.py:900
↓ 1 callersMethodstream_to_file
Streams the output to the given file. Accepts a filename or any path-like object, e.g. pathlib.Path
src/anthropic/_response.py:583
↓ 1 callersMethodstringify
( self, params: Params, *, array_format: ArrayFormat | NotGiven = not_given,
src/anthropic/_qs.py:37
↓ 1 callersFunctionstrip_annotated_type
(typ: type)
src/anthropic/_utils/_typing.py:76
↓ 1 callersFunctionstrip_omit
(obj: None)
src/anthropic/_utils/_utils.py:329
↓ 1 callersMethodsync_auth_flow
(self, request: httpx2.Request)
src/anthropic/lib/credentials/_auth.py:96
↓ 1 callersFunctionsync_client
()
tests/lib/test_google_cloud_live.py:33
↓ 1 callersFunctionsync_client
()
examples/vertex.py:11
↓ 1 callersMethodsync_if_due
Run one sync when `sync_interval` has elapsed since the last. Stores sync in parallel; a store's own paths reconcile in a determinist
src/anthropic/lib/tools/_memories.py:485
↓ 1 callersFunctionsync_main
(loop: asyncio.AbstractEventLoop)
tests/lib/environments/_schedules.py:177
↓ 1 callersMethodtake_slot
(self)
src/anthropic/lib/tools/_memories.py:181
↓ 1 callersFunctiontakes_pydantic
(model: pydantic.BaseModel)
tests/test_models.py:670
↓ 1 callersFunctiontarget_tab
Which tab a call targets: the tab it names by `tab_id`, else the active tab. `None` when the named tab is not in the report (or nothing is active)
src/anthropic/lib/tools/_toolsets/_pipeline.py:137
↓ 1 callersMethodtext
Read and decode the response content into a string.
src/anthropic/_response.py:378
↓ 1 callersMethodtext
(self)
src/anthropic/lib/tools/_files.py:85
↓ 1 callersMethodtexts
(self)
src/anthropic/lib/tools/agent_toolset.py:818
↓ 1 callersMethodto_dict
Recursively generate a dictionary representation of the model, optionally specifying which fields to include or exclude. By default, fields t
src/anthropic/_models.py:215
↓ 1 callersMethodto_dict
(self)
src/anthropic/lib/tools/_beta_functions.py:75
↓ 1 callersMethodto_dict
(self)
src/anthropic/lib/tools/_beta_functions.py:93
↓ 1 callersMethodto_dict
(self)
src/anthropic/lib/tools/_toolsets/_computer.py:118
↓ 1 callersMethodto_dict
(self)
src/anthropic/lib/tools/_toolsets/_browser.py:182
↓ 1 callersFunctionto_message
The reply as the message the API sends for it when not streaming.
tests/lib/tools/test_runner_eager_tools.py:944
↓ 1 callersFunctionto_thread
( func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs )
src/anthropic/_utils/_sync.py:16
↓ 1 callersFunctionto_tool_params
Replace every `to_dict()`-bearing object in `tools` with its entry, keeping order and helper tags.
src/anthropic/lib/tools/_tool_params.py:31
↓ 1 callersFunctiontokens
(usage: object, field: str)
src/anthropic/lib/_tracing/_response.py:84
↓ 1 callersFunctiontool_description
(tool: object)
src/anthropic/lib/_tracing/_tools.py:157
↓ 1 callersMethodtool_ended
(self, session: FakeSession, id: str)
tests/lib/tools/_fake_sessions_api.py:898
↓ 1 callersMethodtool_started
(self, session: FakeSession, id: str)
tests/lib/tools/_fake_sessions_api.py:897
↓ 1 callersFunctiontrace_context_injector
`opentelemetry.propagate.inject`, or `None` when the propagators that the environment names cannot be loaded.
src/anthropic/_tracing.py:896
↓ 1 callersFunctiontraces_of
A copy of the `traces` of `options` as a dict. `True` and `False` are short for `enabled`.
src/anthropic/_tracing.py:232
↓ 1 callersFunctiontruncate_tool_result_content
Serializes `blocks` to JSON within `limit` bytes of UTF-8, dropping the last blocks first. `size` gives the bytes of a string, and never fewer th
src/anthropic/lib/_tracing/_content.py:270
↓ 1 callersMethodtry_start
(self, call: DispatchedToolUseEvent, run: Callable[[RunningCall], Awaitable[None]])
src/anthropic/lib/tools/_beta_session_runner.py:921
↓ 1 callersFunctiontwo_tool_uses_response
(id: str)
tests/lib/threads/helpers.py:669
← previousnext →1,901–2,000 of 14,068, ranked by callers