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
Method
test_async_no_x_api_key_with_azure_ad_token_provider
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_azure.py:211
Method
test_async_parse_converts_pydantic
Verify async .parse() converts Pydantic models to output_config.format.
tests/api_resources/beta/test_output_format_conversion.py:320
Function
test_async_pathlib_in_file_tuple
()
tests/test_files.py:56
Function
test_async_pathlib_includes_file_name
()
tests/test_files.py:27
Function
test_async_pipeline_parity
()
tests/lib/tools/toolsets/test_pipeline.py:1058
Function
test_async_response_basemodel_request_id
(client: Anthropic)
tests/test_response.py:181
Function
test_async_response_parse_annotated_type
(async_client: AsyncAnthropic)
tests/test_response.py:219
Function
test_async_response_parse_bool
(client: AsyncAnthropic, content: str, expected: bool)
tests/test_response.py:272
Function
test_async_response_parse_custom_model
(async_client: AsyncAnthropic)
tests/test_response.py:144
Function
test_async_response_parse_custom_stream
(async_client: AsyncAnthropic)
tests/test_response.py:109
Function
test_async_response_parse_expect_model_union_non_json_content
(async_client: AsyncAnthropic)
tests/test_response.py:308
Function
test_async_response_parse_json_content_type_case_insensitive
(async_client: AsyncAnthropic)
tests/test_response.py:374
Function
test_async_response_parse_mismatched_basemodel
(async_client: AsyncAnthropic)
tests/test_response.py:77
Function
test_async_response_parse_pep604_union
(async_client: AsyncAnthropic)
tests/test_response.py:339
Method
test_async_static_token
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:3234
Function
test_async_supports_anyio_path
()
tests/test_files.py:34
Method
test_async_tags_the_original_and_fallback_requests
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:674
Function
test_async_token_provider_on_sync_client_rejected_clearly
()
tests/lib/test_google_cloud.py:294
Function
test_async_tool_result_parity
(async_navigate: BetaAsyncFunctionTool[Any])
tests/lib/tools/toolsets/test_runnable.py:198
Function
test_async_tool_result_rejects_block_of_another_family
(toolset_name: str | None)
tests/lib/tools/toolsets/test_runnable.py:259
Function
test_async_tool_runner_rejects_a_sync_toolset
(async_client: AsyncAnthropic)
tests/lib/tools/toolsets/test_runner.py:752
Function
test_async_tuple_input
()
tests/test_files.py:41
Function
test_async_unimplemented_members_are_sent_as_disabled_and_implemented_ones_left_to_the_api
()
tests/lib/tools/toolsets/test_interface.py:323
Function
test_async_unknown_member_name_is_sanitised_in_the_refusal
()
tests/lib/tools/toolsets/test_interface.py:352
Function
test_async_unnamed_file_tuple_uses_base_name
()
tests/test_files.py:79
Method
test_async_vertex_middleware_sees_canonical_request
(self, respx_mock: MockRouter)
tests/test_middleware.py:2019
Method
test_async_workload_identity_error_propagates_through_request_flow
Async counterpart of the sync regression test: a WorkloadIdentityError raised by the credential provider must bubble out of the async
tests/lib/test_credentials.py:3401
Method
test_async_workload_identity_exchange
Async client exchanges the OIDC JWT via the token endpoint and attaches the resulting Bearer token to the request.
tests/lib/test_credentials.py:3243
Method
test_audio_unsupported
(self)
tests/lib/tools/test_mcp_tool.py:138
Method
test_auth_explicitly_omitted
(self, client_cls: ClientClass, header: str)
tests/test_header_case_sensitivity.py:252
Method
test_auth_explicitly_omitted_on_the_client
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:260
Method
test_auth_supplied_via_custom_headers_env_var
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:242
Method
test_auth_supplied_via_default_headers
(self, client_cls: ClientClass, headers: Dict[str, str])
tests/test_header_case_sensitivity.py:217
Method
test_auth_supplied_via_extra_headers
(self, client_cls: ClientClass, headers: Dict[str, str])
tests/test_header_case_sensitivity.py:233
Method
test_auth_token_returns_static
(self, clean_env: pytest.MonkeyPatch)
tests/lib/test_credentials.py:2090
Method
test_authorization_default_header_does_not_send_two_credentials
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:108
Method
test_authorized_user_fresh_token_no_refresh
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:678
Method
test_authorized_user_refresh_and_writeback
Refresh writes back to credentials/ only — configs/ stays untouched.
tests/lib/test_credentials.py:630
Method
test_authorized_user_refresh_beta_headers
refresh_token POST must carry oauth-2025-04-20 (unlocks the token endpoint family) but NOT oidc-federation-2026-04-01 (that header is a
tests/lib/test_credentials.py:722
Method
test_authorized_user_refresh_failure
(self, respx_mock: MockRouter, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:693
Method
test_awaited_on_the_running_loop_and_cached
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:3512
Function
test_awaits_async_tool_close_hook
()
tests/lib/tools/test_session_runner.py:1322
Method
test_aws_creds_use_sigv4_mode
(self)
tests/lib/test_bedrock_mantle.py:174
Function
test_aws_profile_suppresses_env_api_key
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:337
Method
test_aws_region_takes_precedence_over_default
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:297
Function
test_backfill_happens_even_with_caller_authorization
( respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_google_cloud.py:570
Function
test_backoff
(description: str, attempt: int, want: float)
tests/lib/environments/test_poller.py:19
Method
test_bad_config_json
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:955
Method
test_bad_model_surfaces_typed_error
(self, sync_client: AnthropicGoogleCloud)
tests/lib/test_google_cloud_live.py:85
Method
test_bad_model_surfaces_typed_error
(self, async_client: AsyncAnthropicGoogleCloud)
tests/lib/test_google_cloud_live.py:120
Function
test_base64_file_input
(send: Send, monkeypatch: pytest.MonkeyPatch)
tests/test_prepare.py:533
Function
test_base_credential_chain_never_engages
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_google_cloud.py:951
Function
test_base_credential_chain_never_engages_async
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_google_cloud.py:966
Method
test_base_url_arg_takes_precedence_over_env
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_bedrock_mantle.py:53
Method
test_base_url_derived
(self)
tests/lib/test_google_cloud.py:1076
Method
test_base_url_derived_from_project_and_location
(self)
tests/lib/test_google_cloud.py:84
Method
test_base_url_env
(self)
tests/test_client.py:1009
Method
test_base_url_env
(self)
tests/test_client.py:2314
Method
test_base_url_from_config
Config `base_url` is used when no ctor override is given.
tests/lib/test_credentials.py:998
Method
test_base_url_no_trailing_slash
(self, client: Anthropic)
tests/test_client.py:1051
Method
test_base_url_no_trailing_slash
(self, client: AsyncAnthropic)
tests/test_client.py:2360
Function
test_base_url_override
()
tests/lib/test_aws.py:360
Method
test_base_url_setter
(self)
tests/test_client.py:999
Method
test_base_url_setter
(self)
tests/test_client.py:2302
Method
test_base_url_trailing_slash
(self, client: Anthropic)
tests/test_client.py:1027
Method
test_base_url_trailing_slash
(self, client: AsyncAnthropic)
tests/test_client.py:2334
Function
test_bash_outer_cancel_closes_subprocess_no_stale_state
Regression: a cancellation from an *outer* scope (e.g. the session runner's `TOOL_TIMEOUT`) during a bash exec must tear the subprocess down,
tests/lib/tools/test_agent_toolset.py:759
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:720
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:745
Function
test_bash_session_persistence
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:701
Function
test_bash_stdin_redirect
A stdin-reading command gets immediate EOF instead of hanging until timeout.
tests/lib/tools/test_agent_toolset.py:733
Function
test_bash_timeout
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:713
Function
test_basic
(value: object)
tests/test_models.py:20
Function
test_basic
()
tests/test_qs.py:17
Function
test_basic
(sync: bool, client: Anthropic, async_client: AsyncAnthropic)
tests/test_streaming.py:17
Function
test_basic
(sync: bool)
tests/decoders/test_jsonl.py:16
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:573
Method
test_basic_call_sync
(self, snapshot_client: Anthropic)
tests/lib/tools/test_runners.py:177
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:11
Method
test_basic_initialization_with_api_key
Test basic async client initialization with API key.
tests/lib/test_azure.py:118
Method
test_basic_response
(self, respx_mock: MockRouter)
tests/lib/streaming/test_messages.py:229
Method
test_basic_response
(self, respx_mock: MockRouter)
tests/lib/streaming/test_messages.py:450
Method
test_basic_response
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:390
Method
test_basic_response
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:644
Method
test_basic_union_response
(self, respx_mock: MockRouter, client: Anthropic)
tests/test_client.py:943
Method
test_basic_union_response
(self, respx_mock: MockRouter, async_client: AsyncAnthropic)
tests/test_client.py:2244
Function
test_bearer_token_not_in_debug_logs
(respx_mock: MockRouter, caplog: pytest.LogCaptureFixture)
tests/lib/test_google_cloud.py:449
Method
test_bearer_token_type_case_insensitive
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:1365
Method
test_bedrock_fallback_middleware_retries_with_new_model
(self, respx_mock: MockRouter)
tests/test_middleware.py:2076
Method
test_bedrock_middleware_sees_canonical_request
(self, respx_mock: MockRouter)
tests/test_middleware.py:1952
Method
test_beta_files_not_available
(self)
tests/lib/test_bedrock_mantle.py:156
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:2444
Method
test_beta_header_not_duplicated
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:2431
Method
test_beta_messages_available
(self)
tests/lib/test_bedrock_mantle.py:148
Function
test_beta_messages_helpers_are_bound
()
tests/lib/test_bedrock.py:611
Method
test_beta_messages_helpers_are_bound
(self)
tests/lib/test_vertex.py:248
Method
test_beta_messages_helpers_are_bound
(self)
tests/lib/test_vertex.py:445
Method
test_beta_models_not_available
(self)
tests/lib/test_bedrock_mantle.py:152
← previous
next →
4,201–4,300 of 9,455, ranked by callers