Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anthropics/anthropic-sdk-python
/ functions
Functions
9,455 in github.com/anthropics/anthropic-sdk-python
⨍
Functions
9,455
◇
Types & classes
3,151
↳
Endpoints
25
↓ 1 callers
Method
parsed_snapshot
(self)
src/anthropic/lib/streaming/_types.py:31
↓ 1 callers
Function
partition_async_tools
The async twin of `partition_sync_tools`: a synchronous runnable raises `wrong_flavour_error`.
src/anthropic/lib/tools/_tool_dispatch.py:105
↓ 1 callers
Function
partition_sync_tools
Split a synchronous `tool_runner`'s `tools` argument into the runnable objects the runner dispatches (function tools and toolsets) and the raw `to
src/anthropic/lib/tools/_tool_dispatch.py:87
↓ 1 callers
Method
patch
( self, path: str, *, cast_to: Type[ResponseT], body: Body | None = No
src/anthropic/_base_client.py:1559
↓ 1 callers
Function
path_visible
The file policy's verdict on one download path, hidden without a policy. Only `True` shows it. A `ToolsetUsageError` propagates. Any other excepti
src/anthropic/lib/tools/_toolsets/_render.py:207
↓ 1 callers
Function
platform_headers
(version: str, *, platform: Platform | None)
src/anthropic/_base_client.py:2452
↓ 1 callers
Method
platform_headers
(self)
src/anthropic/_base_client.py:782
↓ 1 callers
Method
poller
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:1195
↓ 1 callers
Function
predicate
()
tests/lib/tools/toolsets/test_pipeline.py:269
↓ 1 callers
Function
profile_to_ini
Convert an AWS config profile to an INI format string.
tests/lib/test_bedrock.py:44
↓ 1 callers
Function
public_members
(obj: griffe.Object | griffe.Alias)
scripts/detect-breaking-changes.py:35
↓ 1 callers
Function
push
(line: str)
src/anthropic/lib/tools/agent_toolset.py:878
↓ 1 callers
Method
range_is_empty
(self)
src/anthropic/lib/tools/_files.py:49
↓ 1 callers
Function
read_base64
(file: Base64FileInput)
src/anthropic/_utils/_prepare.py:181
↓ 1 callers
Function
read_file_content
(file: FileContent)
src/anthropic/_files.py:92
↓ 1 callers
Method
refresh
(self, _request: object)
tests/lib/test_google_cloud.py:58
↓ 1 callers
Function
refused
(**options: Any)
tests/lib/tools/toolsets/test_computer_interface.py:271
↓ 1 callers
Method
rename
Rename or move a memory file or directory.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:273
↓ 1 callers
Function
render_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 callers
Function
report_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 callers
Function
resolve_assignment_alias
(obj: griffe.Object | griffe.Alias)
scripts/detect-breaking-changes.py:13
↓ 1 callers
Method
resolve_upload_documents
(self, context: BetaURLContext, document_ids: Sequence[str])
src/anthropic/lib/tools/_toolsets/_security.py:230
↓ 1 callers
Method
resolve_upload_documents
(self, context: Any, document_ids: Any)
tests/lib/tools/toolsets/test_enforcement.py:268
↓ 1 callers
Function
resolve_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 callers
Method
resolve_upload_paths
(self, context: BetaURLContext, paths: Sequence[str])
src/anthropic/lib/tools/_toolsets/_security.py:227
↓ 1 callers
Method
resolve_upload_paths
(self, context: Any, paths: Any)
tests/lib/tools/toolsets/test_confirm.py:77
↓ 1 callers
Method
retrieve
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:126
↓ 1 callers
Method
retrieve
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:588
↓ 1 callers
Method
retrieve
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:117
↓ 1 callers
Method
retrieve
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:500
↓ 1 callers
Function
rich_print_str
Like `rich.print()` but returns the string instead
tests/lib/utils.py:66
↓ 1 callers
Function
rows
()
tests/test_prepare.py:779
↓ 1 callers
Function
run
()
tests/lib/tools/test_runners.py:1638
↓ 1 callers
Function
run
()
tests/lib/tools/toolsets/test_browser_runner.py:369
↓ 1 callers
Function
run_and_time
()
tests/lib/tools/test_session_runner.py:1205
↓ 1 callers
Function
scan
(full: Path)
src/anthropic/lib/tools/agent_toolset.py:887
↓ 1 callers
Function
serialize_data
The JSON text that `data` is sent as once prepared.
src/anthropic/_utils/_prepare.py:75
↓ 1 callers
Function
serve
()
tests/lib/environments/test_worker.py:472
↓ 1 callers
Method
setup_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:302
↓ 1 callers
Function
skeleton
Compact structural skeleton of a spliced stream — no text content.
tests/lib/test_refusal_fallback_streaming.py:171
↓ 1 callers
Function
sse
(event: dict[str, Any])
tests/lib/tools/test_runner_eager_tools.py:960
↓ 1 callers
Function
stainless_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:147
↓ 1 callers
Method
start
Track a content_block_start, shifting `event["index"]`.
src/anthropic/lib/middleware/_fallbacks.py:1273
↓ 1 callers
Method
stop
(self)
examples/memory/basic.py:55
↓ 1 callers
Method
str_replace
Replace text in a memory file.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:258
↓ 1 callers
Method
stream_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:574
↓ 1 callers
Method
stringify
( self, params: Params, *, array_format: ArrayFormat | NotGiven = not_given,
src/anthropic/_qs.py:37
↓ 1 callers
Function
strip_annotated_type
(typ: type)
src/anthropic/_utils/_typing.py:76
↓ 1 callers
Function
strip_omit
(obj: None)
src/anthropic/_utils/_utils.py:329
↓ 1 callers
Method
sync_auth_flow
(self, request: httpx2.Request)
src/anthropic/lib/credentials/_auth.py:104
↓ 1 callers
Function
sync_client
()
examples/vertex.py:11
↓ 1 callers
Method
take_slot
(self)
src/anthropic/lib/tools/_memories.py:155
↓ 1 callers
Function
takes_pydantic
(model: pydantic.BaseModel)
tests/test_models.py:636
↓ 1 callers
Function
target_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 callers
Method
text
(self)
src/anthropic/lib/tools/_files.py:85
↓ 1 callers
Function
to_aiter
(iter: Iterator[bytes])
tests/decoders/test_jsonl.py:63
↓ 1 callers
Method
to_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:146
↓ 1 callers
Method
to_dict
(self)
src/anthropic/lib/tools/_beta_functions.py:75
↓ 1 callers
Method
to_dict
(self)
src/anthropic/lib/tools/_beta_functions.py:93
↓ 1 callers
Method
to_dict
(self)
src/anthropic/lib/tools/_toolsets/_computer.py:118
↓ 1 callers
Method
to_dict
(self)
src/anthropic/lib/tools/_toolsets/_browser.py:182
↓ 1 callers
Function
to_message
The reply as the message the API sends for it when not streaming.
tests/lib/tools/test_runner_eager_tools.py:943
↓ 1 callers
Function
to_thread
( func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs )
src/anthropic/_utils/_sync.py:16
↓ 1 callers
Function
tool_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:240
↓ 1 callers
Function
tool_registry
Index the named `tools` by their `name`. On a duplicate name the later tool wins.
src/anthropic/lib/tools/_tool_dispatch.py:139
↓ 1 callers
Method
type
(self, context: BetaToolsetCallContext, input: BetaBrowserTypeInput)
src/anthropic/lib/tools/_toolsets/_browser.py:381
↓ 1 callers
Method
until_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:476
↓ 1 callers
Method
until_done
Blocks until the stream has been consumed
src/anthropic/lib/streaming/_beta_messages.py:126
↓ 1 callers
Method
until_done
Waits until the stream has been consumed
src/anthropic/lib/streaming/_beta_messages.py:280
↓ 1 callers
Method
until_done
Waits until the stream has been consumed
src/anthropic/lib/streaming/_messages.py:276
↓ 1 callers
Function
validate_async_middleware
(middleware: Iterable[MiddlewareInput])
src/anthropic/_middleware.py:107
↓ 1 callers
Function
validate_sync_middleware
(middleware: Iterable[MiddlewareInput])
src/anthropic/_middleware.py:85
↓ 1 callers
Function
vetted_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 callers
Method
view
View the contents of a memory path.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:248
↓ 1 callers
Method
wait_ended
(self)
src/anthropic/lib/environments/_worker.py:151
↓ 1 callers
Function
walk
(e: Optional[BaseException])
tests/lib/test_credentials.py:4407
↓ 1 callers
Function
warn_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:46
↓ 1 callers
Function
warn_explicit_static_shadows_credentials
Warn that an explicit `api_key=` / `auth_token=` argument shadows an explicit `credentials=` provider passed to the same constructor or `copy(
src/anthropic/lib/credentials/_auth.py:30
↓ 1 callers
Function
write
Write a file, creating parent directories as needed.
src/anthropic/lib/tools/agent_toolset.py:724
Method
__aenter__
(self)
src/anthropic/_response.py:681
Method
__aenter__
(self: _T)
src/anthropic/_base_client.py:1798
Method
__aenter__
(self)
src/anthropic/_streaming.py:320
Method
__aenter__
(self)
src/anthropic/lib/tools/_toolsets/_runnable.py:167
Method
__aenter__
(self)
src/anthropic/lib/streaming/_beta_messages.py:232
Method
__aenter__
(self)
src/anthropic/lib/streaming/_beta_messages.py:331
Method
__aenter__
(self)
src/anthropic/lib/streaming/_messages.py:228
Method
__aenter__
(self)
src/anthropic/lib/streaming/_messages.py:326
Method
__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/_response.py:685
Method
__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/_base_client.py:1801
Method
__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/_streaming.py:323
Method
__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, tb: TracebackType | None
src/anthropic/lib/tools/_toolsets/_runnable.py:171
Method
__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/lib/streaming/_beta_messages.py:235
Method
__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/lib/streaming/_beta_messages.py:336
Method
__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/lib/streaming/_messages.py:231
Method
__aexit__
( self, exc_type: type[BaseException] | None, exc: BaseException | None, exc_t
src/anthropic/lib/streaming/_messages.py:331
Method
__aexit__
(self, *exc: object)
tests/lib/tools/test_session_runner.py:158
Method
__aiter__
(self)
src/anthropic/_base_client.py:348
Method
__aiter__
(self)
src/anthropic/_base_client.py:374
Method
__aiter__
(self)
src/anthropic/_streaming.py:206
Method
__aiter__
(self)
src/anthropic/lib/tools/_beta_runner.py:822
← previous
next →
1,301–1,400 of 9,455, ranked by callers