Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anthropics/anthropic-sdk-python
/ functions
Functions
13,873 in github.com/anthropics/anthropic-sdk-python
⨍
Functions
13,873
◇
Types & classes
4,472
↳
Endpoints
93
Function
test_bash_restart_that_is_cancelled_as_its_turn_comes_keeps_the_shell
(bash: Any)
tests/lib/tools/test_agent_toolset.py:1269
Function
test_bash_returns_only_what_the_command_prints_to_stderr
( bash: Any, ctx: AgentToolContext, tmp_path: Path )
tests/lib/tools/test_agent_toolset.py:1425
Function
test_bash_returns_the_output_and_says_if_the_shell_is_gone
( bash: Any, command: str, output: str, is_error: bool, keeps_shell: bool )
tests/lib/tools/test_agent_toolset.py:1366
Function
test_bash_runs_commands_after_a_function_or_alias_hides_a_builtin
(bash: Any, hide: str, name: str)
tests/lib/tools/test_agent_toolset.py:1201
Function
test_bash_runs_concurrent_calls_in_turn
(bash: Any)
tests/lib/tools/test_agent_toolset.py:1450
Function
test_bash_runs_nothing_after_an_expansion_that_failed
(bash: Any, tmp_path: Path, failure: str)
tests/lib/tools/test_agent_toolset.py:1193
Function
test_bash_runs_nothing_more_of_a_stopped_command
(bash: Any, tmp_path: Path, command: str, stop: str)
tests/lib/tools/test_agent_toolset.py:1240
Function
test_bash_runs_nothing_of_a_malformed_command
(bash: Any, tmp_path: Path, command: str)
tests/lib/tools/test_agent_toolset.py:1184
Function
test_bash_runs_the_command_after_a_shell_that_could_not_start
(bash: Any, ctx: AgentToolContext)
tests/lib/tools/test_agent_toolset.py:1285
Function
test_bash_sentinel_not_spoofable
A command that prints a hardcoded marker can't truncate output or spoof the exit code.
tests/lib/tools/test_agent_toolset.py:905
Function
test_bash_session_closed_property
`closed` is the inverse of the old `alive` (TS parity) and there is no `alive` attribute any more.
tests/lib/tools/test_agent_toolset.py:930
Function
test_bash_session_persistence
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:882
Function
test_bash_session_that_is_already_cancelled_sends_nothing
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:1295
Function
test_bash_stdin_redirect
A stdin-reading command gets immediate EOF instead of hanging until timeout.
tests/lib/tools/test_agent_toolset.py:918
Function
test_bash_timeout
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:894
Function
test_bash_timeout_kills_the_command_and_its_shell
(bash: Any, tmp_path: Path, command: str)
tests/lib/tools/test_agent_toolset.py:1009
Function
test_bash_timeout_ms_is_limited_by_the_default
( bash: Any, monkeypatch: pytest.MonkeyPatch, timeout_ms: int | None, seconds: str )
tests/lib/tools/test_agent_toolset.py:1326
Function
test_bash_waits_for_a_command_that_replaced_the_shell_and_closed_its_output
( bash: Any, tmp_path: Path )
tests/lib/tools/test_agent_toolset.py:1375
Function
test_bash_watchdog_is_invisible
(bash: Any)
tests/lib/tools/test_agent_toolset.py:1125
Function
test_basic
(value: object)
tests/test_models.py:35
Function
test_basic
()
tests/test_qs.py:17
Function
test_basic
(sync: bool, client: Anthropic, async_client: AsyncAnthropic)
tests/test_streaming.py:31
Function
test_basic
(sync: bool)
tests/decoders/test_jsonl.py:18
Method
test_basic
(self)
tests/test_utils/test_json.py:15
Function
test_basic_call_async
(async_snapshot_client: AsyncAnthropic)
tests/lib/tools/test_runners.py:535
Method
test_basic_call_sync
(self, snapshot_client: Anthropic)
tests/lib/tools/test_runners.py:186
Method
test_basic_function_schema_conversion
Test basic function schema conversion with simple types.
tests/lib/tools/test_functions.py:18
Method
test_basic_initialization_with_api_key
Test basic client initialization with API key.
tests/lib/test_azure.py:20
Method
test_basic_initialization_with_api_key
Test basic async client initialization with API key.
tests/lib/test_azure.py:127
Method
test_basic_response
(self, respx_mock: MockRouter)
tests/lib/streaming/test_messages.py:266
Method
test_basic_response
(self, respx_mock: MockRouter)
tests/lib/streaming/test_messages.py:578
Method
test_basic_response
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:424
Method
test_basic_response
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:757
Method
test_basic_union_response
(self, respx_mock: MockRouter, client: Anthropic)
tests/test_client.py:1106
Method
test_basic_union_response
(self, respx_mock: MockRouter, async_client: AsyncAnthropic)
tests/test_client.py:2561
Method
test_batch_create
(self, body: dict[str, Any], raw: bool, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:7876
Method
test_batch_create_starts_its_span_with_the_request_count
(self, beta: bool, respx_mock: MockRouter)
tests/test_open_telemetry.py:2666
Method
test_batch_create_without_requests_reaches_the_api
( self, sync: bool, beta: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:8081
Method
test_batch_methods_record_the_batch_id_that_they_are_given
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:2783
Method
test_batch_results_download_failure_fails_the_span
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:1116
Method
test_batch_results_has_the_route_whatever_url_the_batch_names
( self, beta: bool, sync: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:3644
Method
test_batch_results_on_another_host_has_that_host_in_its_url
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:3673
Method
test_batch_results_span_covers_the_download
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:1090
Method
test_batches_keep_the_header
( self, send: SendBatch, client: AnthropicBedrockMantle, respx_mock: MockRouter )
tests/lib/test_bedrock_mantle.py:784
Method
test_batches_send_no_header_when_no_profile_is_set
( self, send: SendBatch, client: AnthropicBedrockMantle, respx_mock: MockRouter )
tests/lib/test_bedrock_mantle.py:810
Method
test_batches_send_the_client_default_header_unless_the_request_names_one
( self, send: SendBatch, user_profile_id: str | Omit, sent: str, clien
tests/lib/test_bedrock_mantle.py:839
Function
test_bearer_token_not_in_debug_logs
(respx_mock: MockRouter, caplog: pytest.LogCaptureFixture)
tests/lib/test_google_cloud.py:636
Method
test_bearer_token_type_case_insensitive
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:1430
Method
test_bedrock_fallback_middleware_retries_with_new_model
(self, respx_mock: MockRouter)
tests/test_middleware.py:2073
Method
test_bedrock_mantle_runner_never_threads
(self, respx_mock: MockRouter)
tests/lib/threads/test_tool_runner_threading.py:823
Method
test_bedrock_middleware_sees_canonical_request
(self, respx_mock: MockRouter)
tests/test_middleware.py:1949
Method
test_bedrock_runner_never_threads
(self, respx_mock: MockRouter)
tests/lib/threads/test_tool_runner_threading.py:801
Method
test_beta_files_not_available
(self)
tests/lib/test_bedrock_mantle.py:204
Method
test_beta_header_dedupe_is_token_based
The dedupe check matches whole comma-separated flags, not substrings. A pre-existing flag containing the OAuth beta as a prefix (e.g. a future
tests/lib/test_credentials.py:2645
Method
test_beta_header_not_duplicated
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:2632
Method
test_beta_messages_available
(self)
tests/lib/test_bedrock_mantle.py:196
Function
test_beta_messages_helpers_are_bound
()
tests/lib/test_bedrock.py:841
Method
test_beta_messages_helpers_are_bound
(self)
tests/lib/test_vertex.py:656
Method
test_beta_messages_helpers_are_bound
(self)
tests/lib/test_vertex.py:1191
Function
test_beta_messages_methods_are_up_to_date
( platform: str, sync: bool, view: str | None, client: Anthropic, async_client: AsyncAnthropic )
tests/lib/test_platform_resources.py:101
Function
test_beta_messages_raw_response
(platform: str, method: str, sync: bool)
tests/lib/test_platform_resources.py:120
Method
test_beta_models_not_available
(self)
tests/lib/test_bedrock_mantle.py:200
Method
test_beta_skills_not_available
(self)
tests/lib/test_bedrock_mantle.py:208
Function
test_beta_stream_rejects_a_string
(client: Anthropic)
tests/lib/test_output_format_helpers.py:132
Function
test_beta_tool_runner_routes_through_invoke
(respx_mock: MockRouter)
tests/lib/test_bedrock.py:788
Function
test_beta_tool_runner_routes_through_invoke_async
(respx_mock: MockRouter)
tests/lib/test_bedrock.py:816
Method
test_beta_tool_runner_routes_through_raw_predict
(self, respx_mock: MockRouter)
tests/lib/test_vertex.py:632
Method
test_beta_tool_runner_routes_through_raw_predict
(self, respx_mock: MockRouter)
tests/lib/test_vertex.py:1167
Function
test_betas_param_and_extra_headers_case_variant
(respx_mock: MockRouter)
tests/lib/test_bedrock.py:950
Method
test_between_tools_thinking_degrades_to_disabled_on_the_hop
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:355
Method
test_between_tools_thinking_degrades_to_disabled_on_the_hop
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:788
Method
test_between_tools_thinking_degrades_to_disabled_on_the_hop
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:338
Method
test_binary_content_upload
(self, respx_mock: MockRouter, client: Anthropic)
tests/test_client.py:1051
Method
test_binary_content_upload
(self, respx_mock: MockRouter, async_client: AsyncAnthropic)
tests/test_client.py:2506
Method
test_binary_content_upload_with_asynciterator
(self)
tests/test_client.py:2522
Method
test_binary_content_upload_with_body_is_rejected
(self, client: Anthropic)
tests/test_client.py:1094
Method
test_binary_content_upload_with_body_is_rejected
(self, async_client: AsyncAnthropic)
tests/test_client.py:2549
Method
test_binary_content_upload_with_iterator
(self)
tests/test_client.py:1067
Function
test_binary_media_types_track_generated_api_types
Pin the read tool's extension map to the codegen'd media-type literals. When a spec change adds or removes a supported image/document media type,
tests/lib/tools/test_agent_toolset.py:482
Method
test_bind_base_url
`bind_base_url` sets the token-exchange URL; unbound → `DEFAULT_BASE_URL`.
tests/lib/test_credentials.py:1225
Method
test_bind_base_url_http_rejected
(self)
tests/lib/test_credentials.py:1247
Method
test_bind_base_url_precedence
`bind_base_url` slots between the config file's own `base_url` field and the hard-coded default: config → bound → default.
tests/lib/test_credentials.py:408
Method
test_blob_resource
(self)
tests/lib/tools/test_mcp_tool.py:271
Method
test_block_sent_as_its_json_is_recorded_by_its_type
(self, spans: Spans)
tests/lib/tools/test_open_telemetry.py:2234
Function
test_blocked_event_loop_delays_the_steps_that_follow
()
tests/lib/environments/test_fake_work_api.py:116
Function
test_blocked_sync_tool_is_abandoned_after_the_lease_ends
( backend: str, monkeypatch: pytest.MonkeyPatch, request: pytest.FixtureRequest )
tests/lib/environments/test_worker.py:448
Function
test_blocked_sync_tool_is_abandoned_at_its_timeout
( then: list[Step], sent: str, request: pytest.FixtureRequest )
tests/lib/tools/test_session_runner.py:1117
Function
test_blocked_sync_tool_is_abandoned_at_most_150_seconds_after_the_runner_stops
( then: list[Step], at: float, request: pytest.FixtureRequest )
tests/lib/tools/test_session_runner.py:1136
Function
test_boolean_schema
()
tests/lib/_parse/test_transform.py:255
Function
test_both_of_two_tools_with_one_name_are_closed
()
tests/lib/tools/test_session_runner.py:1969
Method
test_both_provided_passes
(self)
tests/lib/test_aws_auth.py:22
Function
test_browser_state_is_abstract
()
tests/lib/tools/toolsets/test_interface.py:77
Method
test_builds_request_b_as_a_shape_b_continuation
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:304
Function
test_bytes_and_files_elsewhere_are_rejected
( send: Send, body: object, monkeypatch: pytest.MonkeyPatch )
tests/test_prepare.py:608
Function
test_call_behind_an_unanswered_call_does_not_keep_the_runner_from_stopping
()
tests/lib/tools/test_session_runner.py:982
Function
test_call_does_not_start_until_its_terminated_thread_is_read_as_running
()
tests/lib/tools/test_session_runner.py:1168
Function
test_call_does_not_wait_for_a_call_that_is_not_an_earlier_unanswered_one_of_its_thread
(steps: list[Step])
tests/lib/tools/test_session_runner.py:944
Function
test_call_does_not_wait_for_a_listed_call_that_the_runner_does_not_run
( earlier: Call, thread: str, at: float )
tests/lib/tools/test_session_runner.py:868
Method
test_call_empty_content_returns_empty_list
(self)
tests/lib/tools/test_mcp_tool.py:383
Method
test_call_error
(self)
tests/lib/tools/test_mcp_tool.py:351
← previous
next →
6,201–6,300 of 13,873, ranked by callers