MCPcopy Create free account

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

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

↓ 1 callersFunctionpush
(line: str)
src/anthropic/lib/tools/agent_toolset.py:937
↓ 1 callersMethodrange_is_empty
(self)
src/anthropic/lib/tools/_files.py:49
↓ 1 callersFunctionread_base64
(file: Base64FileInput)
src/anthropic/_utils/_prepare.py:181
↓ 1 callersFunctionread_events
(sync: bool, stream: Any)
tests/test_open_telemetry.py:7942
↓ 1 callersFunctionread_file_content
(file: FileContent)
src/anthropic/_files.py:92
↓ 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 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:427
↓ 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 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:6061
↓ 1 callersFunctionresult_block_content
(content: object)
src/anthropic/lib/_tracing/_content.py:354
↓ 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:139
↓ 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:643
↓ 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:133
↓ 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:572
↓ 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 callersFunctionrun
()
tests/lib/tools/test_runners.py:1616
↓ 1 callersFunctionrun
()
tests/lib/tools/toolsets/test_browser_runner.py:394
↓ 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:946
↓ 1 callersFunctionscoped_and_copy
(parent: ClientT)
tests/lib/test_scoped_client.py:326
↓ 1 callersFunctionserialize_data
The JSON text that `data` is sent as once prepared.
src/anthropic/_utils/_prepare.py:75
↓ 1 callersFunctionserve
()
tests/lib/environments/test_worker.py:479
↓ 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 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 session agent's skills into `{workdir}/skills/<name>/`. No-op unless `client` is set together with `session` (or the dep
src/anthropic/lib/tools/agent_toolset.py:306
↓ 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:7907
↓ 1 callersFunctionskeleton
Compact structural skeleton of a spliced stream — no text content.
tests/lib/test_refusal_fallback_streaming.py:184
↓ 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:960
↓ 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 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_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:576
↓ 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:93
↓ 1 callersFunctionsync_client
()
tests/lib/test_google_cloud_live.py:33
↓ 1 callersFunctionsync_client
()
examples/vertex.py:11
↓ 1 callersMethodtake_slot
(self)
src/anthropic/lib/tools/_memories.py:155
↓ 1 callersFunctiontakes_pydantic
(model: pydantic.BaseModel)
tests/test_models.py:651
↓ 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
(self)
src/anthropic/lib/tools/_files.py:85
↓ 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:214
↓ 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:943
↓ 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 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 callersFunctiontwo_tool_uses_response
(id: str)
tests/lib/threads/helpers.py:669
↓ 1 callersMethodtype
(self, context: BetaToolsetCallContext, input: BetaBrowserTypeInput)
src/anthropic/lib/tools/_toolsets/_browser.py:381
↓ 1 callersFunctiontype_names_under
The `type` of each member of a union and of everything in their fields, except inside a `stop_at` type.
tests/test_open_telemetry.py:8262
↓ 1 callersFunctionunder
(path: tuple[str, ...], parent: tuple[str, ...])
tests/test_open_telemetry.py:8362
↓ 1 callersMethoduntil_done
Drive the runner to completion, discarding the per-call observations. Named to match `BetaToolRunner.until_done` (and to avoid colliding
src/anthropic/lib/tools/_beta_session_runner.py:512
↓ 1 callersMethoduntil_done
Blocks until the stream has been consumed
src/anthropic/lib/streaming/_beta_messages.py:130
↓ 1 callersMethoduntil_done
Waits until the stream has been consumed
src/anthropic/lib/streaming/_beta_messages.py:302
↓ 1 callersMethoduntil_done
Waits until the stream has been consumed
src/anthropic/lib/streaming/_messages.py:290
↓ 1 callersFunctionvalidate_async_middleware
(middleware: Iterable[MiddlewareInput])
src/anthropic/_middleware.py:107
↓ 1 callersFunctionvalidate_sync_middleware
(middleware: Iterable[MiddlewareInput])
src/anthropic/_middleware.py:85
↓ 1 callersFunctionvetted_upload_entries
One `file_upload` field run through the file policy's `hook`: the entries the driver receives, read once (a generator is spent after one pass).
src/anthropic/lib/tools/_toolsets/_pipeline.py:365
↓ 1 callersMethodview
View the contents of a memory path.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:249
↓ 1 callersMethodwait_ended
(self)
src/anthropic/lib/environments/_worker.py:152
↓ 1 callersFunctionwalk
(e: Optional[BaseException])
tests/lib/test_credentials.py:4844
↓ 1 callersFunctionwarn_env_api_key_shadows_env_auth_token
Warn that `ANTHROPIC_AUTH_TOKEN` is ignored because `ANTHROPIC_API_KEY` is set as well.
src/anthropic/lib/credentials/_auth.py:48
← previousnext →1,701–1,800 of 12,274, ranked by callers