MCPcopy Create free account

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

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

↓ 2 callersFunctionschedule
(data: st.DataObject, kinds: list[list[Step]], gaps: list[float])
tests/lib/environments/test_worker_properties.py:91
↓ 2 callersMethodscreenshot
(self, context: BetaToolsetCallContext, input: BetaBrowserScreenshotInput)
tests/lib/tools/toolsets/_fakes.py:106
↓ 2 callersMethodscreenshot
(self, context: BetaToolsetCallContext, input: BetaComputerScreenshotInput)
tests/lib/tools/toolsets/_computer_fakes.py:54
↓ 2 callersMethodsend
Send the staged messages and `messages` as one turn and return the reply. Keyword arguments apply to this turn only. Raises `AnthropicError` w
src/anthropic/lib/threads/_beta_threads.py:180
↓ 2 callersFunctionsend_hop
Send a request built from `entry`, resending it once without `speed` when it inherited `fast` and was rejected with a capacity error. Also returns
src/anthropic/lib/middleware/_fallbacks.py:1500
↓ 2 callersMethodsend_message
The message is listed as pending until a turn starts, which may never happen.
tests/lib/tools/_fake_sessions_api.py:445
↓ 2 callersMethodsending
Counts `request`, which the SDK is about to send, and records the URL of the call's first request.
src/anthropic/_tracing.py:326
↓ 2 callersFunctionsessions_token_from_secret
`secret` is URL-safe base64 of JSON. Never log it or the token.
src/anthropic/lib/environments/_poller.py:337
↓ 2 callersFunctionset_message_content
Sets the content attributes of a Messages create call, within `limit`, the client's `max_content_bytes`. `output` is the response's content, if i
src/anthropic/lib/_tracing/_content.py:393
↓ 2 callersMethodset_params
Replace the request fields, tools and output format with those of `params`, so that one it leaves out is no longer sent, except the container
src/anthropic/lib/threads/_thread_state.py:173
↓ 2 callersFunctionset_resend_count
(span: Span, result: ApiCallResult)
src/anthropic/_tracing.py:645
↓ 2 callersFunctionset_response_attributes
Sets the `response` attributes that `SPAN_ATTRIBUTES` gives the spans named `span_name`, from `data`. `data` is the body of a response, as a mode
src/anthropic/_tracing.py:669
↓ 2 callersFunctionset_response_status_code
(span: Span, result: ApiCallResult)
src/anthropic/_tracing.py:639
↓ 2 callersFunctionset_tool_runner_status
Sets the status of a tool runner's span, if it has one: `OK`, or what `error` makes it. Never raises.
src/anthropic/lib/_tracing/_tools.py:67
↓ 2 callersFunctionset_usage_sums
Sets the usage attributes that are sums of fields of `message`, a Message as a model or as a decoded body. The compaction sums need `complete`, b
src/anthropic/lib/_tracing/_response.py:45
↓ 2 callersFunctionshort_circuit_message
(*, model: str = "claude-opus-4-6")
tests/test_middleware.py:389
↓ 2 callersFunctionsigv4_signature
The SigV4 signature of `request` as it was sent, over the headers that its `Authorization` header lists.
tests/test_open_telemetry.py:239
↓ 2 callersFunctionstart_api_call_span
Starts the call span of the API call that the prepared `options` describe. `stream` is whether the call streams its response, and `default_header
src/anthropic/_tracing.py:363
↓ 2 callersMethodstartable
The calls of `running` start at the same instant, and so in any order.
tests/lib/tools/test_session_runner_properties.py:298
↓ 2 callersFunctionstatic_credential_from_env
The `(api_key, auth_token)` that the environment supplies. At most one of the two is set. With `warn`, logs what that credential shadows: `ANTHRO
src/anthropic/_client.py:97
↓ 2 callersMethodstop_threading
Drop the `thread` field from this turn and every later one.
src/anthropic/lib/threads/_thread_state.py:305
↓ 2 callersFunctionstored_state
(client: object)
tests/lib/test_client_copy.py:212
↓ 2 callersFunctionstream_error_response
A stream whose first event is an error.
tests/lib/threads/helpers.py:779
↓ 2 callersFunctionstreamed_message
What records `stream` on the span of its API call, or `None` when the call has no span.
src/anthropic/lib/_tracing/_streaming.py:167
↓ 2 callersMethodstringify_items
( self, params: Params, *, array_format: ArrayFormat | NotGiven = not_given,
src/anthropic/_qs.py:52
↓ 2 callersFunctionsubprocess_env
()
tests/test_detect_breaking_changes.py:38
↓ 2 callersMethodswitch_tab
( self, context: BetaToolsetCallContext, input: BetaBrowserSwitchTabInput )
tests/lib/tools/toolsets/_fakes.py:142
↓ 2 callersMethodterminal_failure_frames
Degrade to the suppressed refusal when every remaining entry failed over HTTP: replay its message_delta verbatim — `recommended_model`
src/anthropic/lib/middleware/_fallbacks.py:1190
↓ 2 callersFunctiontext_block
(text: str)
src/anthropic/lib/tools/_toolsets/_render.py:91
↓ 2 callersFunctionthread_arguments
The arguments of a `thread()` call as the params a thread's state starts from.
src/anthropic/lib/threads/_params.py:75
↓ 2 callersMethodthreads
(self)
src/anthropic/lib/tools/_beta_session_runner.py:918
↓ 2 callersFunctionto_aiter
(iter: Iterator[bytes])
tests/test_streaming.py:431
↓ 2 callersFunctionto_aiter
(iter: Iterator[bytes])
tests/decoders/test_jsonl.py:169
↓ 2 callersFunctionto_events
The reply as the stream events the API sends for it.
tests/lib/tools/test_runner_eager_tools.py:910
↓ 2 callersMethodtoken
Return a valid access token, loading ADC / refreshing as needed. Blocking.
src/anthropic/lib/google_cloud/_client.py:84
↓ 2 callersFunctiontool_family
A tool definition's family, as the API computes it for a toolset: its `type` ("custom" when absent) without a trailing `_YYYYMMDD` date and then w
src/anthropic/lib/tools/_tool_dispatch.py:256
↓ 2 callersFunctiontool_registry
Index the named `tools` by their `name`. On a duplicate name the later tool wins.
src/anthropic/lib/tools/_tool_dispatch.py:155
↓ 2 callersFunctiontool_result_content
(content: object)
src/anthropic/lib/_tracing/_content.py:339
↓ 2 callersFunctiontool_use_span
Runs the block in the span of one client tool run, which ends with the result that the block set on the run. The span is named `anthropic.tool_us
src/anthropic/lib/_tracing/_tools.py:91
↓ 2 callersMethodtrack
Follows the reply, and returns the call that `event` shows the model has moved on from, if any. A call's own `content_block_stop` isn't enoug
src/anthropic/lib/tools/_beta_runner.py:1711
↓ 2 callersMethodturn_ending_idle
(self, events: list[dict[str, Any]])
tests/lib/tools/test_session_runner_properties.py:313
↓ 2 callersFunctionunnamed_file
(file: HttpxFileContent)
src/anthropic/_files.py:87
↓ 2 callersMethodunwrap
Verifies the webhook signature from the `webhook-id`, `webhook-timestamp` and `webhook-signature` headers using your webhook signing
src/anthropic/resources/beta/webhooks.py:29
↓ 2 callersFunctionuses_control_plane
(options: FinalRequestOptions)
src/anthropic/lib/bedrock/_client.py:111
↓ 2 callersFunctionvalid_access_token
(value: object)
src/anthropic/lib/credentials/_cache.py:30
↓ 2 callersFunctionversion_bounds
(text: str)
scripts/utils/check-dist.py:61
↓ 2 callersFunctionviolations
(trace: Trace)
tests/lib/environments/test_worker_properties.py:224
↓ 2 callersFunctionvirtual_clock
Makes the code that does not read the event loop's clock follow it too, and the clock wait for threads.
tests/lib/environments/_schedules.py:282
↓ 2 callersMethodwait_ended
(self, session: FakeSession, state: CallState)
tests/lib/tools/test_session_runner_properties.py:237
↓ 2 callersMethodwaited_on
(self, session: FakeSession, state: CallState)
tests/lib/tools/test_session_runner_properties.py:206
↓ 2 callersMethodwaits_for_result
(self)
tests/lib/environments/_fake_work_api.py:209
↓ 2 callersMethodwas_terminated
(self, session: FakeSession, id: str)
tests/lib/tools/test_session_runner_properties.py:230
↓ 2 callersFunctionwith_bounded_tab_urls
The report with each tab's and each download's page-supplied URL as the model will read it, folded to one line and held to the API's limit (see `b
src/anthropic/lib/tools/_toolsets/_pipeline.py:110
↓ 2 callersFunctionwith_item_token
(client: ClientT, item: BetaSelfHostedWork)
src/anthropic/lib/environments/_poller.py:330
↓ 2 callersMethodwithin_limits
(self, session: FakeSession, running: set[str], id: str)
tests/lib/tools/test_session_runner_properties.py:294
↓ 2 callersFunctionwithout
(value: dict[str, Any], *keys: str)
tests/test_open_telemetry.py:7733
↓ 2 callersFunctionwithout_collection
()
tests/utils.py:279
↓ 2 callersFunctionwithout_data
`value` without its `encrypted_` fields, which are opaque, and without image and document data, which is large and binary, at any depth.
src/anthropic/lib/_tracing/_content.py:371
↓ 2 callersFunctionwithout_rejected_fast_speed
The hop's `request` to resend, or `None` when its result stands. `speed` is dropped, not set to `standard`: a model without fast mode rejects the
src/anthropic/lib/middleware/_fallbacks.py:1527
↓ 2 callersFunctionwrite_text_exact
Write a UTF-8 file without newline translation.
src/anthropic/lib/tools/_files.py:18
↓ 2 callersFunctionwrong_flavour_error
The error for a sync tool or toolset handed to the async runner (or the reverse), raised when the runner is built. A toolset mismatch is a `Toolse
src/anthropic/lib/tools/_tool_dispatch.py:84
↓ 2 callersMethodzoom
(self, context: BetaToolsetCallContext, input: BetaComputerZoomInput)
tests/lib/tools/toolsets/_computer_fakes.py:57
↓ 1 callersMethod__aenter__
(self)
src/anthropic/lib/tools/agent_toolset.py:362
↓ 1 callersMethod__aexit__
(self, *exc: object)
src/anthropic/lib/tools/_file_store.py:132
↓ 1 callersMethod__aexit__
(self, *exc: object)
src/anthropic/lib/tools/agent_toolset.py:366
↓ 1 callersMethod__apply_policy
Run the `url_policy` callable on one address, raising the refusal unless it passes or there is no policy.
src/anthropic/lib/tools/_toolsets/_browser.py:299
↓ 1 callersMethod__apply_policy
(self, url: str, context: BetaURLContext)
src/anthropic/lib/tools/_toolsets/_browser.py:549
↓ 1 callersMethod__as_proxied__
Helper method that returns the current proxy, typed as the loaded object
src/anthropic/_utils/_proxy.py:60
↓ 1 callersMethod__browser_state
(self, context: BetaToolsetCallContext)
src/anthropic/lib/tools/_toolsets/_browser.py:289
↓ 1 callersMethod__browser_state
(self, context: BetaToolsetCallContext)
src/anthropic/lib/tools/_toolsets/_browser.py:541
↓ 1 callersMethod__decode__
(self)
tests/decoders/test_jsonl.py:101
↓ 1 callersMethod__enter__
(self)
src/anthropic/lib/tools/_toolsets/_runnable.py:125
↓ 1 callersMethod__init__
Construct a new synchronous Anthropic client instance. Credentials are resolved in the following order (first match wins): 1. An exp
src/anthropic/_client.py:141
↓ 1 callersMethod__init__
(self, observer: StreamObserver)
src/anthropic/_tracing.py:518
↓ 1 callersMethod__init__
(self, root: Path, removed_on_dispose: bool, utf8_only: bool = False)
src/anthropic/lib/tools/_file_store.py:87
↓ 1 callersMethod__init__
(self, content: BetaFunctionToolResultType)
src/anthropic/lib/tools/_beta_functions.py:50
↓ 1 callersMethod__init__
( self, *, cast_to: type[_T], response: httpx2.Response, client: Anthr
src/anthropic/lib/bedrock/_stream.py:15
↓ 1 callersMethod__init__
( self, *, aws_access_key: str | None = None, aws_secret_key: str | None = Non
src/anthropic/lib/bedrock/_mantle.py:156
↓ 1 callersMethod__init__
( self, aws_secret_key: str | None = None, aws_access_key: str | None = None,
src/anthropic/lib/bedrock/_client.py:155
↓ 1 callersMethod__init__
( self, *, api_key: str | None = None, aws_access_key: str | None = None,
src/anthropic/lib/aws/_client.py:35
↓ 1 callersMethod__init__
( self, thread: BetaMessageThread[ResponseFormatT], messages: Iterable[BetaMessagePara
src/anthropic/lib/threads/_stream_managers.py:27
↓ 1 callersMethod__init__
( self, *, region: str | NotGiven = not_given, project_id: str | NotGiven = no
src/anthropic/lib/vertex/_client.py:58
↓ 1 callersMethod__init__
Construct a new synchronous Claude Models on Google Cloud (Anthropic managed) client. Auth precedence (first match wins, unless `skip_auth=Tr
src/anthropic/lib/google_cloud/_client.py:252
↓ 1 callersMethod__init__
( self, *, raw_iterator: Iterator[bytes], line_type: type[_T], http_re
src/anthropic/_decoders/jsonl.py:25
↓ 1 callersMethod__init__
(self)
tests/utils.py:191
↓ 1 callersMethod__init__
(self, *, retried: bool = False)
tests/test_tracing.py:105
↓ 1 callersMethod__init__
(self, **kwargs: Any)
tests/test_streaming.py:264
↓ 1 callersMethod__init__
(self, **kwargs: Any)
tests/decoders/test_jsonl.py:96
↓ 1 callersMethod__load__
(self)
src/anthropic/_utils/_proxy.py:65
↓ 1 callersMethod__run__
(self)
src/anthropic/lib/tools/_beta_runner.py:685
↓ 1 callersMethod__run__
(self)
src/anthropic/lib/tools/_beta_runner.py:1222
↓ 1 callersMethod__stream__
(self)
src/anthropic/lib/streaming/_beta_messages.py:146
↓ 1 callersMethod__stream__
(self)
src/anthropic/lib/streaming/_beta_messages.py:320
↓ 1 callersMethod__stream__
(self)
src/anthropic/lib/streaming/_messages.py:141
↓ 1 callersMethod__stream__
(self)
src/anthropic/lib/streaming/_messages.py:308
↓ 1 callersMethod__stream_text__
(self)
src/anthropic/lib/streaming/_beta_messages.py:172
↓ 1 callersMethod__stream_text__
(self)
src/anthropic/lib/streaming/_beta_messages.py:346
↓ 1 callersMethod__stream_text__
(self)
src/anthropic/lib/streaming/_messages.py:162
↓ 1 callersMethod__stream_text__
(self)
src/anthropic/lib/streaming/_messages.py:329
↓ 1 callersMethod_accepts_heartbeat
(self, item: Item, expected: str | None, token: Token | None)
tests/lib/environments/_fake_work_api.py:449
← previousnext →1,301–1,400 of 14,068, ranked by callers