MCPcopy Create free account

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

Functions4,911 in github.com/anthropics/anthropic-sdk-python

↓ 1 callersFunctionmain
()
scripts/detect-breaking-changes.py:50
↓ 1 callersFunctionmain
(argv: Sequence[str] | None = None)
scripts/utils/ruffen-docs.py:143
↓ 1 callersFunctionmain
()
examples/web_search_stream.py:6
↓ 1 callersFunctionmain
()
examples/managed-agents-streaming-deltas-manual.py:19
↓ 1 callersFunctionmain
()
examples/agents_comprehensive.py:17
↓ 1 callersFunctionmain
()
examples/agents.py:8
↓ 1 callersFunctionmain
()
examples/text_completions_demo_sync.py:7
↓ 1 callersFunctionmain
()
examples/managed-agents-worker-dispatch.py:48
↓ 1 callersFunctionmain
()
examples/tools_runner.py:44
↓ 1 callersFunctionmain
()
examples/text_completions_demo_async.py:9
↓ 1 callersFunctionmain
()
examples/managed-agents-self-hosted-sandbox-worker.py:54
↓ 1 callersFunctionmain
()
examples/tools_runner_search_tool.py:64
↓ 1 callersFunctionmain
()
examples/messages_stream.py:10
↓ 1 callersFunctionmain
()
examples/tools_stream.py:8
↓ 1 callersFunctionmain
()
examples/fallbacks.py:6
↓ 1 callersFunctionmain
()
examples/mcp_tool_runner.py:22
↓ 1 callersFunctionmain
Primary scenario: drive a session yourself and watch each tool call. No work queue and no lease are involved — we create the session, send a
examples/managed-agents-observe-tool-calls.py:52
↓ 1 callersFunctionmain
()
examples/agents_with_files.py:9
↓ 1 callersFunctionmake_stream_iterator
( content: Iterator[bytes], *, sync: bool, client: Anthropic, async_client: AsyncAnthropic
tests/test_streaming.py:284
↓ 1 callersFunctionmake_tool_searcher
Returns a tool that Claude can use to search through all available tools
examples/tools_runner_search_tool.py:47
↓ 1 callersFunctionmodel_json
(model: pydantic.BaseModel, *, indent: int | None = None)
src/anthropic/_compat.py:128
↓ 1 callersFunctionmy_iter
()
tests/test_transform.py:426
↓ 1 callersMethodnote_event
Arm the clock on an ``end_turn`` idle, disarm it on anything else. ``user.tool_confirmation`` events are neutral: they signal neither agent
src/anthropic/lib/tools/_beta_session_runner.py:169
↓ 1 callersFunctionparse_date
(value: date | StrBytesIntFloat)
src/anthropic/_compat.py:24
↓ 1 callersFunctionparse_date
(value: Union[date, StrBytesIntFloat])
src/anthropic/_utils/_compat.py:40
↓ 1 callersFunctionparse_datetime
(value: Union[datetime, StrBytesIntFloat])
src/anthropic/_compat.py:27
↓ 1 callersMethodparsed_snapshot
(self)
src/anthropic/lib/streaming/_types.py:32
↓ 1 callersFunctionplatform_headers
(version: str, *, platform: Platform | None)
src/anthropic/_base_client.py:2479
↓ 1 callersMethodplatform_headers
(self)
src/anthropic/_base_client.py:763
↓ 1 callersMethodpoller
Async-iterate work items claimed from a self-hosted environment. Each yielded item has been ack'd. The environment key authenticates the
src/anthropic/resources/beta/environments/work.py:1113
↓ 1 callersFunctionprofile_to_ini
Convert an AWS config profile to an INI format string.
tests/lib/test_bedrock.py:36
↓ 1 callersFunctionpublic_members
(obj: griffe.Object | griffe.Alias)
scripts/detect-breaking-changes.py:13
↓ 1 callersFunctionpush
(line: str)
src/anthropic/lib/tools/agent_toolset.py:771
↓ 1 callersFunctionread_file_content
(file: FileContent)
src/anthropic/_files.py:79
↓ 1 callersMethodrename
Rename or move a memory file or directory.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:272
↓ 1 callersMethodretrieve
Get a specific model. The Models API response can be used to determine information about a specific model or resolve a model
src/anthropic/resources/models.py:44
↓ 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:112
↓ 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:508
↓ 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:96
↓ 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:406
↓ 1 callersFunctionrich_print_str
Like `rich.print()` but returns the string instead
tests/lib/utils.py:66
↓ 1 callersFunctionrun_and_time
()
tests/lib/tools/test_session_runner.py:1110
↓ 1 callersFunctionrun_runnable_tool
Call ``tool`` with ``input``, awaiting the result if the tool is async. Bridges the sync (:class:`~anthropic.lib.tools.BetaFunctionTool`) and asy
src/anthropic/lib/tools/_tool_dispatch.py:134
↓ 1 callersFunctionscan
(full: Path)
src/anthropic/lib/tools/agent_toolset.py:780
↓ 1 callersMethodsetup_skills
Download the session agent's skills into ``{workdir}/skills/<name>/``. No-op unless both :attr:`client` and :attr:`session_id` are set. The
src/anthropic/lib/tools/agent_toolset.py:269
↓ 1 callersFunctionskeleton
Compact structural skeleton of a spliced stream — no text content.
tests/lib/test_refusal_fallback_streaming.py:171
↓ 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:128
↓ 1 callersMethodstart
Track a content_block_start, shifting `event["index"]`.
src/anthropic/lib/middleware/_fallbacks.py:1246
↓ 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:257
↓ 1 callersFunctionstream_error
()
examples/text_completions_streaming.py:43
↓ 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:569
↓ 1 callersMethodstringify
( self, params: Params, *, array_format: ArrayFormat | NotGiven = not_given,
src/anthropic/_qs.py:36
↓ 1 callersMethodsync_auth_flow
(self, request: httpx.Request)
src/anthropic/lib/credentials/_auth.py:105
↓ 1 callersFunctionsync_client
()
examples/vertex.py:6
↓ 1 callersFunctionsync_stream
()
examples/text_completions_streaming.py:15
↓ 1 callersFunctiontakes_pydantic
(model: pydantic.BaseModel)
tests/test_models.py:637
↓ 1 callersFunctionto_aiter
(iter: Iterator[bytes])
tests/decoders/test_jsonl.py:63
↓ 1 callersMethodto_dict
(self)
src/anthropic/lib/tools/_beta_functions.py:73
↓ 1 callersMethodto_dict
(self)
src/anthropic/lib/tools/_beta_functions.py:88
↓ 1 callersFunctionto_thread
( func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs )
src/anthropic/_utils/_sync.py:16
↓ 1 callersFunctiontransform
Transform dictionaries based off of type information from the given type, for example: ```py class Params(TypedDict, total=False): ca
src/anthropic/_utils/_transform.py:92
↓ 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:451
↓ 1 callersMethoduntil_done
Blocks until the stream has been consumed
src/anthropic/lib/streaming/_beta_messages.py:121
↓ 1 callersMethoduntil_done
Waits until the stream has been consumed
src/anthropic/lib/streaming/_beta_messages.py:270
↓ 1 callersMethoduntil_done
Waits until the stream has been consumed
src/anthropic/lib/streaming/_messages.py:266
↓ 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 callersMethodview
View the contents of a memory path.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:247
↓ 1 callersFunctionwalk
(e: Optional[BaseException])
tests/lib/test_credentials.py:3216
↓ 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.
src/anthropic/lib/credentials/_auth.py:47
↓ 1 callersFunctionwarn_explicit_static_shadows_credentials
Warn that an explicit ``api_key=`` / ``auth_token=`` argument shadows an explicit ``credentials=`` provider passed to the same constructor or
src/anthropic/lib/credentials/_auth.py:31
↓ 1 callersFunctionwrite
Write a file, creating parent directories as needed.
src/anthropic/lib/tools/agent_toolset.py:621
Method__aenter__
(self)
src/anthropic/_response.py:676
Method__aenter__
(self: _T)
src/anthropic/_base_client.py:1792
Method__aenter__
(self)
src/anthropic/_streaming.py:341
Method__aenter__
(self)
src/anthropic/lib/streaming/_beta_messages.py:222
Method__aenter__
(self)
src/anthropic/lib/streaming/_beta_messages.py:321
Method__aenter__
(self)
src/anthropic/lib/streaming/_messages.py:218
Method__aenter__
(self)
src/anthropic/lib/streaming/_messages.py:316
Method__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/_response.py:680
Method__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/_base_client.py:1795
Method__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/_streaming.py:344
Method__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/lib/streaming/_beta_messages.py:225
Method__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/lib/streaming/_beta_messages.py:326
Method__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/lib/streaming/_messages.py:221
Method__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/lib/streaming/_messages.py:321
Method__aexit__
(self, *exc: object)
tests/lib/tools/test_session_runner.py:150
Method__aiter__
(self)
src/anthropic/_base_client.py:327
Method__aiter__
(self)
src/anthropic/_base_client.py:353
Method__aiter__
(self)
src/anthropic/_streaming.py:238
Method__aiter__
(self)
src/anthropic/lib/tools/_beta_runner.py:467
Method__aiter__
(self)
src/anthropic/lib/tools/_beta_session_runner.py:446
Method__aiter__
(self)
src/anthropic/lib/middleware/_fallbacks.py:1630
Method__aiter__
(self)
src/anthropic/lib/streaming/_beta_messages.py:218
Method__aiter__
(self)
src/anthropic/lib/streaming/_messages.py:214
Method__aiter__
(self)
src/anthropic/_decoders/jsonl.py:121
Method__aiter__
(self)
tests/lib/tools/test_session_runner.py:153
Method__anext__
(self)
src/anthropic/lib/tools/_beta_runner.py:464
Method__anext__
(self)
src/anthropic/lib/streaming/_beta_messages.py:215
← previousnext →801–900 of 4,911, ranked by callers