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
Function
expand
(text: str)
tests/lib/tools/toolsets/test_pipeline.py:857
↓ 1 callers
Function
extract_stream_chunk_type
Given a type like `Stream[T]`, returns the generic type variable `T`. This also handles the case where a concrete subclass is given, e.g. ```
src/anthropic/_streaming.py:521
↓ 1 callers
Function
failing
(send: Any)
tests/lib/tools/memory_sync/test_lost_response.py:43
↓ 1 callers
Function
fetch_token_from_my_auth_service
(*, force_refresh: bool = False)
examples/workload_identity.py:167
↓ 1 callers
Function
file_metadata_body
()
tests/test_middleware.py:366
↓ 1 callers
Function
fill
(target: Dict[str, Any], key: str, env_var: str)
src/anthropic/lib/credentials/_providers.py:94
↓ 1 callers
Function
find_breaking_changes
( new_obj: griffe.Object | griffe.Alias, old_obj: griffe.Object | griffe.Alias, *, path: list[
scripts/detect-breaking-changes.py:46
↓ 1 callers
Method
finish
Render the call's outcome with the browser state the driver just reported. On success the content is the member's rendering plus the `browser
src/anthropic/lib/tools/_toolsets/_pipeline.py:168
↓ 1 callers
Function
finish_fragment
()
scripts/utils/ruffen-docs.py:59
↓ 1 callers
Method
form
The multipart content that `body` is sent as next to a file.
tests/test_prepare.py:98
↓ 1 callers
Function
format_code_blocks
Formats all the given blocks with one run of ruff, as starting ruff takes far longer than formatting a block. Returns nothing if ruff can't forma
scripts/utils/ruffen-docs.py:125
↓ 1 callers
Function
format_file
( filename: str, skip_errors: bool, format_code_block: Callable[[str], str], )
scripts/utils/ruffen-docs.py:155
↓ 1 callers
Function
function_has_argument
Returns whether or not the given function has a specific parameter
src/anthropic/_utils/_reflection.py:24
↓ 1 callers
Method
generate_tool_call_response
Generate a MessageParam by calling tool functions with any tool use blocks from the last message. Note the tool call response is cached, repe
src/anthropic/lib/tools/_beta_runner.py:913
↓ 1 callers
Method
get_api_list
( self, path: str, *, model: Type[object], page: Type[SyncPageT],
src/anthropic/_base_client.py:1611
↓ 1 callers
Function
get_async_library
()
src/anthropic/_utils/_utils.py:426
↓ 1 callers
Function
get_caller_name
(*, stacklevel: int = 1)
tests/lib/utils.py:50
↓ 1 callers
Method
get_client
(self)
src/anthropic/_vendor/httpx_aiohttp/transport.py:121
↓ 1 callers
Method
get_final_message
Waits until the stream has been read to completion and returns the accumulated `Message` object.
src/anthropic/lib/streaming/_beta_messages.py:97
↓ 1 callers
Method
get_final_message
Waits until the stream has been read to completion and returns the accumulated `Message` object.
src/anthropic/lib/streaming/_beta_messages.py:251
↓ 1 callers
Method
get_final_message
Waits until the stream has been read to completion and returns the accumulated `Message` object.
src/anthropic/lib/streaming/_messages.py:247
↓ 1 callers
Function
get_model_config
(model: type[pydantic.BaseModel])
src/anthropic/_compat.py:105
↓ 1 callers
Function
get_python_runtime
()
src/anthropic/_base_client.py:2475
↓ 1 callers
Function
get_python_version
()
src/anthropic/_base_client.py:2482
↓ 1 callers
Function
get_response_stream_shape
()
src/anthropic/lib/bedrock/_stream_decoder.py:15
↓ 1 callers
Function
get_weather
Lookup the weather for a given city in either celsius or fahrenheit Args: location: The city and state, e.g. San Francisco, CA
tests/lib/tools/test_runners.py:575
↓ 1 callers
Method
handle
(self, request: APIRequest, call_next: CallNext)
src/anthropic/lib/middleware/_fallbacks.py:193
↓ 1 callers
Method
handle
(self, request: APIRequest, call_next: CallNext)
tests/test_middleware.py:234
↓ 1 callers
Method
handle_async
(self, request: APIRequest, call_next: AsyncCallNext)
tests/test_middleware.py:238
↓ 1 callers
Function
has_async_close
True if the provider's `close()` is `async def`, which only `AsyncAnthropic` can await.
src/anthropic/lib/credentials/_close.py:27
↓ 1 callers
Function
has_upper_bound
(requirement: Requirement)
scripts/utils/check-dependency-caps.py:25
↓ 1 callers
Method
heartbeat
Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating se
src/anthropic/resources/beta/environments/work.py:334
↓ 1 callers
Function
human_join
(seq: Sequence[str], *, delim: str = ", ", final: str = "or")
src/anthropic/_utils/_utils.py:207
↓ 1 callers
Function
image_block
One image block around the base64 `data` a screenshot or zoom member returned.
src/anthropic/lib/tools/_toolsets/_render.py:95
↓ 1 callers
Function
input_field
(input: BaseModel, path: str)
src/anthropic/lib/tools/_toolsets/_render.py:63
↓ 1 callers
Function
input_problem
One pydantic error as `loc: message` (the value is not echoed).
src/anthropic/lib/tools/_toolsets/_base.py:525
↓ 1 callers
Method
insert
Insert text at a specific line number in a memory file.
src/anthropic/lib/tools/_beta_builtin_memory_tool.py:263
↓ 1 callers
Function
is_basemodel
Returns whether or not the given type is either a `BaseModel` or a union of `BaseModel`
src/anthropic/_models.py:534
↓ 1 callers
Function
is_ipv4_hostname
(hostname: str)
src/anthropic/_utils/_httpx.py:16
↓ 1 callers
Function
is_ipv6_hostname
(hostname: str)
src/anthropic/_utils/_httpx.py:24
↓ 1 callers
Function
is_iterable
(obj: object)
src/anthropic/_utils/_utils.py:202
↓ 1 callers
Function
is_list_type
(typ: type)
src/anthropic/_utils/_typing.py:25
↓ 1 callers
Method
is_path_visible
Whether a `download_completed` path may reach the model. Only `True` shows it; any other answer forwards the event without it.
src/anthropic/lib/tools/_toolsets/_hooks.py:70
↓ 1 callers
Function
is_required_type
(typ: type)
src/anthropic/_utils/_typing.py:44
↓ 1 callers
Function
is_sequence
(obj: object)
src/anthropic/_utils/_utils.py:178
↓ 1 callers
Function
is_sequence_type
(typ: type)
src/anthropic/_utils/_typing.py:29
↓ 1 callers
Function
is_stream_class_type
TypeGuard for determining whether or not the given type is a subclass of `Stream` / `AsyncStream`
src/anthropic/_streaming.py:515
↓ 1 callers
Function
is_typevar
(typ: type)
src/anthropic/_utils/_typing.py:48
↓ 1 callers
Function
items
()
tests/test_prepare.py:572
↓ 1 callers
Method
iter_pages
(self: SyncPageT)
src/anthropic/_base_client.py:296
↓ 1 callers
Method
iter_pages
(self: AsyncPageT)
src/anthropic/_base_client.py:379
↓ 1 callers
Function
js_call
A call to the browser's `javascript_exec`.
tests/lib/tools/test_runner_eager_toolsets.py:424
↓ 1 callers
Function
json_safe
Translates a mapping / sequence recursively in the same fashion as `pydantic` v2's `model_dump(mode="json")`.
src/anthropic/_utils/_utils.py:443
↓ 1 callers
Function
layout
The identity and contents of `value` and of everything inside it.
tests/test_prepare.py:680
↓ 1 callers
Method
list
(self, memory_store_id: str, **kwargs: Any)
tests/lib/tools/memory_sync/test_memory_sync.py:667
↓ 1 callers
Function
load_auth
(*, project_id: str | None)
src/anthropic/lib/vertex/_auth.py:17
↓ 1 callers
Function
load_default_credentials
Load Application Default Credentials with the `cloud-platform` scope and mint an initial access token. Returns the credentials object and the
src/anthropic/lib/_extras/_google_auth.py:46
↓ 1 callers
Function
load_fixture
Load a fixture file from the fixtures directory.
tests/lib/streaming/helpers.py:10
↓ 1 callers
Function
logged_options
()
tests/test_prepare.py:506
↓ 1 callers
Function
lru_cache
A version of functools.lru_cache that retains the type signature for the wrapped function arguments.
src/anthropic/_utils/_utils.py:433
↓ 1 callers
Function
main
()
scripts/detect-breaking-changes.py:73
↓ 1 callers
Function
main
()
scripts/utils/check-dependency-caps.py:29
↓ 1 callers
Function
main
(argv: Sequence[str] | None = None)
scripts/utils/ruffen-docs.py:177
↓ 1 callers
Function
main
()
examples/web_search_stream.py:6
↓ 1 callers
Function
main
()
examples/managed-agents-streaming-deltas-manual.py:23
↓ 1 callers
Function
main
()
examples/agents_comprehensive.py:17
↓ 1 callers
Function
main
()
examples/agents.py:8
↓ 1 callers
Function
main
()
examples/managed-agents-worker-dispatch.py:48
↓ 1 callers
Function
main
()
examples/tools_runner.py:44
↓ 1 callers
Function
main
()
examples/managed-agents-self-hosted-sandbox-worker.py:54
↓ 1 callers
Function
main
()
examples/tools_runner_deferred_streaming.py:26
↓ 1 callers
Function
main
()
examples/tools_runner_search_tool.py:64
↓ 1 callers
Function
main
()
examples/messages_stream.py:10
↓ 1 callers
Function
main
()
examples/tools_stream.py:8
↓ 1 callers
Function
main
()
examples/fallbacks.py:6
↓ 1 callers
Function
main
()
examples/mcp_tool_runner.py:22
↓ 1 callers
Function
main
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 callers
Function
main
()
examples/agents_with_files.py:9
↓ 1 callers
Function
make_stream_iterator
( content: Iterator[bytes], *, sync: bool, client: Anthropic, async_client: AsyncAnthropic
tests/test_streaming.py:284
↓ 1 callers
Function
make_tool_searcher
Returns a tool that Claude can use to search through all available tools
examples/tools_runner_search_tool.py:47
↓ 1 callers
Function
malformed_call_detail
(input: Dict[str, object])
src/anthropic/lib/tools/_beta_runner.py:1253
↓ 1 callers
Function
max_overlap
(browser: FakeBrowser)
tests/lib/tools/toolsets/test_pipeline.py:1015
↓ 1 callers
Method
member_enabled
Whether `configs` leave `name` enabled, failing closed when the answer is unclear. Only a real boolean `enabled` turns a member on or off. An
src/anthropic/lib/tools/_toolsets/_base.py:134
↓ 1 callers
Function
merge_pending_changes
State changes held back from earlier calls (a failed call's, or a popup's `tab_opened` after `new_tab`), followed by this report's own, coalesced
src/anthropic/lib/tools/_toolsets/_pipeline.py:230
↓ 1 callers
Function
message_text
(event: BetaManagedAgentsAgentMessageEvent)
examples/managed-agents-streaming-deltas-manual.py:19
↓ 1 callers
Function
model_json
(model: pydantic.BaseModel, *, indent: int | None = None)
src/anthropic/_compat.py:123
↓ 1 callers
Function
names_network_or_device
Whether, on Windows, `candidate` is a UNC / device-namespace path or has a component naming a DOS device. Elsewhere these are ordinary names (`aux
src/anthropic/lib/tools/_toolsets/_security.py:41
↓ 1 callers
Function
navigate
()
tests/lib/tools/toolsets/test_browser_runner.py:328
↓ 1 callers
Function
nested
(depth: int)
tests/test_prepare.py:730
↓ 1 callers
Function
new_tab_changes
The changes for this block and the changes to hold, as `(keep, held)`. On a `new_tab` result (`opened` is the tab it opened) the block carries exa
src/anthropic/lib/tools/_toolsets/_pipeline.py:262
↓ 1 callers
Method
next_page_info
(self)
src/anthropic/pagination.py:168
↓ 1 callers
Method
next_page_info
(self)
src/anthropic/pagination.py:192
↓ 1 callers
Method
next_page_info
(self)
src/anthropic/pagination.py:217
↓ 1 callers
Method
next_page_info
(self)
src/anthropic/pagination.py:242
↓ 1 callers
Method
note_event
Arm the clock on an idle that ends the turn, disarm it on anything else. `user.tool_confirmation` events are neutral: they signal neither age
src/anthropic/lib/tools/_beta_session_runner.py:177
↓ 1 callers
Function
on_call
(i: int)
tests/lib/tools/memory_sync/test_e2e_memory.py:138
↓ 1 callers
Function
overridden
Those of `names` that `cls` overrides, by method identity against the family's abstract classes (their own member and `execute` bodies are `defaul
src/anthropic/lib/tools/_toolsets/_base.py:439
↓ 1 callers
Function
pages
()
tests/test_prepare.py:783
↓ 1 callers
Function
parse_date
(value: date | StrBytesIntFloat)
src/anthropic/_compat.py:24
↓ 1 callers
Function
parse_datetime
(value: Union[datetime, StrBytesIntFloat])
src/anthropic/_compat.py:27
← previous
next →
1,201–1,300 of 9,455, ranked by callers