MCPcopy Create free account

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

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

↓ 11 callersFunctionget_args
(t: type[Any])
src/anthropic/_compat.py:30
↓ 11 callersFunctionget_origin
(t: type[Any])
src/anthropic/_compat.py:36
↓ 11 callersMethodheartbeat
(self, work_id: str, **_kwargs: Any)
tests/lib/environments/test_worker.py:665
↓ 11 callersMethodrename
Rename or move a memory file or directory.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:159
↓ 11 callersFunctionresolve_base_url
Resolve the base URL from constructor arg, env var, or region. Returns None if no base URL is resolvable (caller should raise).
src/anthropic/lib/aws/_credentials.py:108
↓ 11 callersFunctionresolve_path
Resolve ``p`` against the workdir; reject results that escape it. Absolute and relative inputs go through the same canonicalise-then-contain
src/anthropic/lib/tools/agent_toolset.py:359
↓ 11 callersFunctionresolve_region
Resolve the AWS region from constructor arg or env var. Does not silently default — returns None if no region is available.
src/anthropic/lib/aws/_credentials.py:82
↓ 11 callersMethodsend
(self, session_id: str, *, events: list[Any], extra_headers: Any = None)
tests/lib/tools/test_session_runner.py:225
↓ 10 callersFunction_validate_output_config_conflict
( output_config: BetaOutputConfigParam | Omit, output_format: object, )
src/anthropic/resources/beta/messages/messages.py:4201
↓ 10 callersFunction_warn_output_format_deprecated
Emit deprecation warning if output_format is provided.
src/anthropic/resources/beta/messages/messages.py:4225
↓ 10 callersMethodack
(self, work_id: str, **kwargs: Any)
tests/lib/environments/test_poller_method.py:63
↓ 10 callersMethodadd
Add Session Resource Args: file_id: ID of a previously uploaded file. mount_path: Mount path in the container.
src/anthropic/resources/beta/sessions/resources.py:296
↓ 10 callersFunctionaiter_work
Async version of :func:`iter_work`. See its docstring for semantics, including how ``extra_headers`` is passed through per request.
src/anthropic/lib/environments/_poller.py:189
↓ 10 callersMethodbind_base_url
Set the API ``base_url`` the token exchange POSTs to. For standalone use (no client) or tests. Clients bind through :meth:`for_base_u
src/anthropic/lib/credentials/_workload.py:205
↓ 10 callersMethodclose
(self)
src/anthropic/lib/tools/agent_toolset.py:519
↓ 10 callersMethodcreate_enrollment_url
Create Enrollment URL Args: betas: Optional header to specify the beta version(s) you want to use. extra_header
src/anthropic/resources/beta/user_profiles.py:323
↓ 10 callersFunctiondelta
(event_id: str, text: str, index: int | None = None)
tests/lib/sessions/test_accumulate.py:43
↓ 10 callersFunctionget_auth_headers
( *, method: str, url: str, headers: httpx.Headers, aws_access_key: str | None, aws_se
src/anthropic/lib/aws/_auth.py:33
↓ 10 callersFunctionget_origin
(tp: type[Any])
src/anthropic/_utils/_compat.py:19
↓ 10 callersFunctionmake_event_iterator
( content: Iterator[bytes], *, sync: bool, client: Anthropic, async_client: AsyncAnthropic
tests/test_streaming.py:266
↓ 10 callersMethodmcp_oauth_validate
Validate Credential Args: betas: Optional header to specify the beta version(s) you want to use. extra_headers:
src/anthropic/resources/beta/vaults/credentials.py:414
↓ 10 callersFunctionmodel_copy
(model: _ModelT, *, deep: bool = False)
src/anthropic/_compat.py:122
↓ 10 callersFunctionopenapi_dumps
Serialize an object to UTF-8 encoded JSON bytes. Extends the standard json.dumps with support for additional types commonly used in the
src/anthropic/_utils/_json.py:11
↓ 10 callersMethodpause
Pause Deployment Args: betas: Optional header to specify the beta version(s) you want to use. extra_headers: Se
src/anthropic/resources/beta/deployments.py:436
↓ 10 callersMethodpoll
(self, environment_id: str, **kwargs: Any)
tests/lib/environments/test_poller_method.py:54
↓ 10 callersMethodredact
Redact a memory version Args: betas: Optional header to specify the beta version(s) you want to use. extra_head
src/anthropic/resources/beta/memory_stores/memory_versions.py:214
↓ 10 callersFunctionresolve_workspace_id
Resolve the workspace ID from constructor arg or env var(s). Returns None if no workspace ID is available (caller should raise).
src/anthropic/lib/aws/_credentials.py:93
↓ 10 callersMethodresults
Streams the results of a Message Batch as a `.jsonl` file. Each line in the file is a JSON object containing the result of a single
src/anthropic/resources/messages/batches.py:285
↓ 10 callersMethodretrieve_metadata
Get File Metadata Args: file_id: ID of the File. betas: Optional header to specify the beta version(s) you want
src/anthropic/resources/beta/files.py:237
↓ 10 callersMethodreveal_token
The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a
src/anthropic/resources/beta/tunnels/tunnels.py:295
↓ 10 callersMethodrotate_token
The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a
src/anthropic/resources/beta/tunnels/tunnels.py:351
↓ 10 callersMethodstats
Get statistics about the work queue for an environment. Args: betas: Optional header to specify the beta version(s) you wa
src/anthropic/resources/beta/environments/work.py:466
↓ 10 callersMethodunpause
Unpause Deployment Args: betas: Optional header to specify the beta version(s) you want to use. extra_headers:
src/anthropic/resources/beta/deployments.py:530
↓ 10 callersMethodupload
Upload File Args: file: The file to upload betas: Optional header to specify the beta version(s) you want to us
src/anthropic/resources/beta/files.py:286
↓ 9 callersMethod__anext__
(self)
src/anthropic/_streaming.py:235
↓ 9 callersFunction_fake_client
(work: _FakeWorkResource, sessions: _FakeSessions)
tests/lib/environments/test_worker.py:92
↓ 9 callersFunction_result_text
Concatenated text of the posted-back result's text blocks.
tests/lib/tools/test_session_runner.py:120
↓ 9 callersFunction_send_message_async
(client: AsyncAnthropic)
tests/lib/test_credentials.py:2811
↓ 9 callersFunctionaccumulate_managed_agents_event
( accumulated: AccumulatedEvent | None, event: BetaManagedAgentsAgentMessageEvent, )
src/anthropic/lib/sessions/_accumulate.py:22
↓ 9 callersFunctionassert_empty_iter
(iter: Iterator[ServerSentEvent] | AsyncIterator[ServerSentEvent])
tests/test_streaming.py:261
↓ 9 callersFunctionasyncify
Take a blocking function and create an async one that receives the same positional and keyword arguments. Usage: ```python def
src/anthropic/_utils/_sync.py:28
↓ 9 callersMethodclose
(self)
src/anthropic/_client.py:425
↓ 9 callersMethodclose
(self)
src/anthropic/_client.py:839
↓ 9 callersMethodcopy
Create a new client re-using the current options, with optional overrides. Passing either of ``token_provider`` / ``credentials`` replaces th
src/anthropic/lib/google_cloud/_client.py:365
↓ 9 callersFunctionmessage_start
()
tests/lib/test_refusal_fallback_streaming.py:110
↓ 9 callersFunctionmiddleware_request_body
(request: APIRequest)
tests/test_middleware.py:83
↓ 9 callersMethodmonotonic
(self)
tests/lib/environments/test_worker.py:570
↓ 9 callersFunctionseed
(event_id: str)
tests/lib/sessions/test_accumulate.py:28
↓ 9 callersMethodstr_replace
Replace text in a memory file.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:144
↓ 8 callersFunction_api_status_error
(code: int)
tests/lib/environments/test_poller_method.py:36
↓ 8 callersMethod_auth_block
Return the cached ``authentication`` sub-object from the config file.
src/anthropic/lib/credentials/_providers.py:501
↓ 8 callersFunction_blob_resource
(uri: str = "file:///x.bin", blob: str = "", mime: str | None = None)
tests/lib/tools/test_mcp_tool.py:47
↓ 8 callersMethod_calculate_nonstreaming_timeout
(self, max_tokens: int, max_nonstreaming_tokens: int | None)
src/anthropic/_base_client.py:768
↓ 8 callersFunction_idle_end_turn
()
tests/lib/tools/test_session_runner.py:110
↓ 8 callersFunction_merge_output_configs
( output_config: BetaOutputConfigParam | Omit, output_format: Optional[BetaJSONOutputFormatParam] | Om
src/anthropic/resources/beta/messages/messages.py:4213
↓ 8 callersFunction_message_json
()
tests/lib/test_stainless_helpers.py:34
↓ 8 callersFunction_workload_credentials
()
tests/lib/test_credentials.py:2005
↓ 8 callersFunctionconstruct_type_unchecked
Loose coercion to the expected type with construction of nested values. Note: the returned value from this function is not guaranteed to match th
src/anthropic/_models.py:575
↓ 8 callersFunctionerror_body
(*, type: str, message: str)
tests/test_middleware.py:75
↓ 8 callersFunctionfold
( msg: BetaManagedAgentsAgentMessageEvent, ev: BetaManagedAgentsDeltaEvent, )
tests/lib/sessions/test_accumulate.py:34
↓ 8 callersFunctionis_list
(obj: object)
src/anthropic/_utils/_utils.py:198
↓ 8 callersFunctionis_mapping
(obj: object)
src/anthropic/_utils/_utils.py:186
↓ 8 callersMethodparse
(self, *, to: type[_T])
src/anthropic/_response.py:311
↓ 8 callersMethodparse
(self, *, to: type[_T])
src/anthropic/_response.py:424
↓ 8 callersFunctionrefusal_delta
(token: str | None = "tok_abc", has_prefill_claim: bool = True)
tests/lib/test_refusal_fallback_streaming.py:128
↓ 8 callersFunctiontag_helper
Mark an object as created by a named SDK helper.
src/anthropic/lib/_stainless_helpers.py:84
↓ 8 callersMethodto_json
Generates a JSON string representing this model as it would be received from or sent to the API (but with indentation). By default, fields th
src/anthropic/_models.py:183
↓ 7 callersFunction_api_status_error
(code: int)
tests/lib/tools/test_session_runner.py:125
↓ 7 callersFunction_end_turn_response
()
tests/lib/tools/test_runners.py:799
↓ 7 callersMethod_ensure_memory_root
Ensure the memory root directory exists
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:669
↓ 7 callersFunction_install_scoped_client
Intercept the shared bearer-auth client factory. Returns the list of args the factory was called with so a test can assert on the helper-tele
tests/lib/environments/test_worker.py:98
↓ 7 callersMethod_make_client
(self)
tests/lib/test_bedrock_mantle.py:130
↓ 7 callersFunction_mcp_field_v1_or_v2
(obj: Any, name: str)
src/anthropic/lib/tools/mcp.py:82
↓ 7 callersFunction_mock_client
(result: CallToolResult | None = None)
tests/lib/tools/test_mcp_tool.py:67
↓ 7 callersFunction_read_result
(contents: list[Any])
tests/lib/tools/test_mcp_tool.py:51
↓ 7 callersFunction_text_resource
(uri: str = "file:///x.txt", text: str = "hello", mime: str | None = None)
tests/lib/tools/test_mcp_tool.py:43
↓ 7 callersFunction_tool_reference_block
(kind: Literal["tool_removal", "tool_addition"], name: str)
tests/lib/tools/test_runners.py:815
↓ 7 callersFunction_tool_use_response
(tool_name: str, tool_use_id: str, input: Union[Dict[str, Any], None] = None)
tests/lib/tools/test_runners.py:776
↓ 7 callersMethod_validate_path
Validate and resolve memory paths
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:387
↓ 7 callersFunctionasync_to_httpx_files
(files: None)
src/anthropic/_files.py:84
↓ 7 callersFunctionbeta_agent_toolset_20260401
Return the ``agent_toolset_20260401`` implementations bound to ``ctx``. The result is a plain list of :class:`~anthropic.lib.tools.BetaAsyncFunct
src/anthropic/lib/tools/agent_toolset.py:891
↓ 7 callersFunctionbeta_headers
(respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:104
↓ 7 callersFunctionblock_starts
(events: list[BetaRawMessageStreamEvent])
tests/lib/test_refusal_fallback_streaming.py:194
↓ 7 callersMethodexec
(self, cmd: str, timeout: float = BASH_DEFAULT_TIMEOUT)
src/anthropic/lib/tools/agent_toolset.py:443
↓ 7 callersMethodextra_headers
Return headers derived from the config file (e.g. ``workspace_id``). Eagerly reads the config if not yet loaded. The returned dict is
src/anthropic/lib/credentials/_providers.py:287
↓ 7 callersFunctionextract_type_arg
(typ: type, index: int)
src/anthropic/_utils/_typing.py:83
↓ 7 callersFunctionextract_type_var_from_base
Given a type like `Foo[T]`, returns the generic type variable `T`. This also handles the case where a concrete subclass is given, e.g. ```py
src/anthropic/_utils/_typing.py:91
↓ 7 callersFunctionget_args
(tp: type[Any])
src/anthropic/_utils/_compat.py:15
↓ 7 callersFunctionmodel_dump
( model: pydantic.BaseModel, *, exclude: IncEx | None = None, exclude_unset: bool = False,
src/anthropic/_compat.py:144
↓ 7 callersMethodparse
(self, *, to: type[_T])
src/anthropic/_legacy_response.py:101
↓ 7 callersMethodrequest
( self, cast_to: Type[ResponseT], options: FinalRequestOptions, *, str
src/anthropic/_base_client.py:1082
↓ 7 callersFunctionrequest_body
(call: MockRequestCall)
tests/test_middleware.py:79
↓ 7 callersFunctionto_httpx_files
(files: None)
src/anthropic/_files.py:42
↓ 7 callersFunctionvalidate_credentials
Raise if only one of aws_access_key/aws_secret_key is provided.
src/anthropic/lib/aws/_credentials.py:7
↓ 6 callersMethod_build_workload_delegate
(self, auth: Dict[str, Any])
src/anthropic/lib/credentials/_providers.py:698
↓ 6 callersFunction_custom_tool_use
A CUSTOM (user-defined) tool call — the agent emits ``agent.custom_tool_use`` rather than ``agent.tool_use`` for these.
tests/lib/tools/test_session_runner.py:96
↓ 6 callersFunction_install_run_session_tools
(monkeypatch: pytest.MonkeyPatch, record: dict[str, Any])
tests/lib/environments/test_worker.py:131
↓ 6 callersFunction_mock_deployment
Mock one deployment: its token endpoint mints ``token`` and its messages endpoint accepts anything. Pair with :func:`_requests_to` to check th
tests/lib/test_credentials.py:1982
↓ 6 callersFunction_mock_token_endpoint
(respx_mock: MockRouter)
tests/lib/test_credentials.py:1947
↓ 6 callersFunction_mode
(p: Path)
tests/lib/tools/test_skills.py:164
← previousnext →101–200 of 5,068, ranked by callers