MCPcopy Create free account

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

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

↓ 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:306
↓ 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:598
↓ 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:1210
↓ 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:1025
↓ 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:936
↓ 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:328
↓ 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 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: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 callersMethodstart_turn
(self, thread: str = PRIMARY)
tests/lib/tools/_fake_sessions_api.py:309
↓ 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:892
↓ 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: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:463
↓ 1 callersFunctionsync_main
(loop: asyncio.AbstractEventLoop)
tests/lib/environments/_schedules.py:177
↓ 1 callersMethodtake_slot
(self)
src/anthropic/lib/tools/_memories.py:159
↓ 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:371
↓ 1 callersMethodtext
(self)
src/anthropic/lib/tools/_files.py:85
↓ 1 callersMethodtexts
(self)
src/anthropic/lib/tools/agent_toolset.py:798
↓ 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: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 callersMethodtool_ended
(self, session: FakeSession, id: str)
tests/lib/tools/_fake_sessions_api.py:890
↓ 1 callersMethodtool_started
(self, session: FakeSession, id: str)
tests/lib/tools/_fake_sessions_api.py:889
↓ 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:897
↓ 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 callersMethodunconfirmed_calls
(self)
src/anthropic/lib/tools/_beta_session_runner.py:745
↓ 1 callersFunctionunder
(path: tuple[str, ...], parent: tuple[str, ...])
tests/test_open_telemetry.py:8362
↓ 1 callersFunctionunfinished
(api: FakeApi, workers: tuple[str, ...])
tests/lib/environments/test_worker_properties.py:237
↓ 1 callersMethodunposted
(self, session: FakeSession)
tests/lib/tools/test_session_runner_properties.py:304
↓ 1 callersMethoduntil_done
Blocks until the stream has been consumed
src/anthropic/lib/streaming/_beta_messages.py:131
↓ 1 callersMethoduntil_done
Waits until the stream has been consumed
src/anthropic/lib/streaming/_beta_messages.py:303
↓ 1 callersMethoduntil_done
Waits until the stream has been consumed
src/anthropic/lib/streaming/_messages.py:292
↓ 1 callersMethoduser_input
One soon after another does nothing.
tests/lib/environments/_fake_work_api.py:244
↓ 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 callersMethodviolations
(self)
tests/lib/environments/test_worker_properties.py:142
↓ 1 callersMethodwait_for_all
Returns once no call is running. It never returns after a call raised.
src/anthropic/lib/tools/_beta_session_runner.py:918
↓ 1 callersFunctionwalk
(e: Optional[BaseException])
tests/lib/test_credentials.py:5169
↓ 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
↓ 1 callersFunctionwarn_env_static_shadows_auto_discovery
Warn that an `ANTHROPIC_API_KEY` / `ANTHROPIC_AUTH_TOKEN` from the environment is shadowing the SDK's profile / federation auto-discovery. Pe
src/anthropic/lib/credentials/_auth.py:30
↓ 1 callersMethodwithhold_snapshot
(self)
src/anthropic/lib/_tracing/_streaming.py:126
↓ 1 callersFunctionwithout
`fields` without the value at `path`, as a copy that shares what the path does not go through.
src/anthropic/lib/_tracing/_response.py:89
↓ 1 callersFunctionwithout_cache_control
A copy of `value`, which `as_sent()` returned, without the `cache_control` of any block in it, however deep. Only the keys that hold blocks are fo
src/anthropic/lib/threads/_thread_state.py:652
↓ 1 callersMethodwithout_events
(self)
src/anthropic/lib/tools/_beta_session_runner.py:706
↓ 1 callersFunctionwithout_message_delta_fields
The fields of the streamed `message` without what is under `FINAL_FROM_MESSAGE_DELTA`. Until that event the snapshot has what `message_start` put
src/anthropic/lib/_tracing/_response.py:34
↓ 1 callersFunctionwithout_omit
`hints` with the `| Omit` that every optional field of a thread params type adds to the type `create()` gives it.
tests/lib/threads/test_beta_threads.py:2250
↓ 1 callersMethodwork_without_lease
(self)
tests/lib/environments/test_worker_properties.py:165
↓ 1 callersFunctionwrite
Write a file, creating parent directories as needed.
src/anthropic/lib/tools/agent_toolset.py:1009
↓ 1 callersFunctionwrite_package
(repo: Path, files: dict[str, str])
tests/test_detect_breaking_changes.py:53
↓ 1 callersMethodwrong_credentials
(self)
tests/lib/environments/test_worker_properties.py:158
↓ 1 callersMethodwrong_heartbeats
(self)
tests/lib/environments/test_worker_properties.py:178
← previousnext →1,901–2,000 of 13,873, ranked by callers