MCPcopy Create free account

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

Functions12,274 in github.com/anthropics/anthropic-sdk-python

Methodtest_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:3365
Methodtest_audio_unsupported
(self)
tests/lib/tools/test_mcp_tool.py:138
Methodtest_auth_explicitly_omitted
(self, client_cls: ClientClass, header: str)
tests/test_header_case_sensitivity.py:252
Methodtest_auth_explicitly_omitted_on_the_client
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:260
Methodtest_auth_supplied_via_custom_headers_env_var
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:242
Methodtest_auth_supplied_via_default_headers
(self, client_cls: ClientClass, headers: Dict[str, str])
tests/test_header_case_sensitivity.py:217
Methodtest_auth_supplied_via_extra_headers
(self, client_cls: ClientClass, headers: Dict[str, str])
tests/test_header_case_sensitivity.py:233
Methodtest_auth_token_returns_static
(self, clean_env: pytest.MonkeyPatch)
tests/lib/test_credentials.py:2150
Methodtest_authorization_default_header_does_not_send_two_credentials
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:108
Methodtest_authorized_user_fresh_token_no_refresh
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:743
Methodtest_authorized_user_refresh_and_writeback
Refresh writes back to credentials/ only — configs/ stays untouched.
tests/lib/test_credentials.py:667
Methodtest_authorized_user_refresh_beta_headers
refresh_token POST must carry oauth-2025-04-20 but NOT oidc-federation-2026-04-01.
tests/lib/test_credentials.py:787
Methodtest_authorized_user_refresh_failure
(self, respx_mock: MockRouter, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:758
Methodtest_authorized_user_refresh_writeback_without_fchmod
( self, respx_mock: MockRouter, tmp_path: pathlib.Path )
tests/lib/test_credentials.py:717
Methodtest_auto_discovered_profile_error_is_silent_fallthrough
( self, clean_env: pytest.MonkeyPatch, tmp_path: pathlib.Path )
tests/lib/test_credentials.py:2351
Methodtest_awaited_on_the_running_loop_and_cached
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:3634
Functiontest_awaits_async_tool_close_hook
()
tests/lib/tools/test_session_runner.py:1348
Functiontest_aws_client_in_api_key_mode_sends_only_the_bearer
`AnthropicAWS.copy()` passes the parent's key back in, so the base `copy()` cannot drop it. The key would then win over the bearer.
tests/lib/test_scoped_client.py:225
Methodtest_aws_creds_use_sigv4_mode
(self)
tests/lib/test_bedrock_mantle.py:227
Functiontest_aws_profile_suppresses_env_api_key
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:349
Methodtest_aws_region_takes_precedence_over_default
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:297
Functiontest_backfill_happens_even_with_caller_authorization
( respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_google_cloud.py:815
Functiontest_backoff
(description: str, attempt: int, want: float)
tests/lib/environments/test_poller.py:19
Methodtest_bad_config_json
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:1018
Methodtest_bad_model_surfaces_typed_error
(self, sync_client: AnthropicGoogleCloud)
tests/lib/test_google_cloud_live.py:86
Methodtest_bad_model_surfaces_typed_error
(self, async_client: AsyncAnthropicGoogleCloud)
tests/lib/test_google_cloud_live.py:141
Functiontest_base64_file_input
(send: Send, monkeypatch: pytest.MonkeyPatch)
tests/test_prepare.py:533
Functiontest_base_credential_chain_never_engages
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_google_cloud.py:1196
Functiontest_base_credential_chain_never_engages_async
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_google_cloud.py:1211
Methodtest_base_url_arg_takes_precedence_over_env
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_bedrock_mantle.py:101
Methodtest_base_url_argument_wins
( self, client_class: type[AnthropicFoundry | AsyncAnthropicFoundry], monkeypatch: pytest.MonkeyPatch
tests/lib/test_azure.py:219
Methodtest_base_url_derived
(self)
tests/lib/test_google_cloud.py:1321
Methodtest_base_url_derived_from_project_and_location
(self)
tests/lib/test_google_cloud.py:131
Methodtest_base_url_env
(self)
tests/test_client.py:1118
Methodtest_base_url_env
(self)
tests/test_client.py:2560
Methodtest_base_url_from_config
Config `base_url` is used when no ctor override is given.
tests/lib/test_credentials.py:1061
Methodtest_base_url_no_trailing_slash
(self, client: Anthropic)
tests/test_client.py:1160
Methodtest_base_url_no_trailing_slash
(self, client: AsyncAnthropic)
tests/test_client.py:2606
Functiontest_base_url_override
()
tests/lib/test_aws.py:372
Methodtest_base_url_setter
(self)
tests/test_client.py:1108
Methodtest_base_url_setter
(self)
tests/test_client.py:2548
Methodtest_base_url_trailing_slash
(self, client: Anthropic)
tests/test_client.py:1136
Methodtest_base_url_trailing_slash
(self, client: AsyncAnthropic)
tests/test_client.py:2580
Methodtest_base_url_values_are_single_path_segments
( self, values: tuple[str, str, str], segments: tuple[str, str, str], deferred
tests/lib/test_google_cloud.py:143
Methodtest_base_url_values_are_single_path_segments
( self, values: tuple[str, str, str], segments: tuple[str, str, str], deferred
tests/lib/test_google_cloud.py:1330
Functiontest_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:928
Functiontest_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:889
Functiontest_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:914
Functiontest_bash_session_persistence
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:870
Functiontest_bash_stdin_redirect
A stdin-reading command gets immediate EOF instead of hanging until timeout.
tests/lib/tools/test_agent_toolset.py:902
Functiontest_bash_timeout
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:882
Functiontest_basic
(value: object)
tests/test_models.py:35
Functiontest_basic
()
tests/test_qs.py:17
Functiontest_basic
(sync: bool, client: Anthropic, async_client: AsyncAnthropic)
tests/test_streaming.py:31
Functiontest_basic
(sync: bool)
tests/decoders/test_jsonl.py:18
Methodtest_basic
(self)
tests/test_utils/test_json.py:15
Functiontest_basic_call_async
(async_snapshot_client: AsyncAnthropic)
tests/lib/tools/test_runners.py:535
Methodtest_basic_call_sync
(self, snapshot_client: Anthropic)
tests/lib/tools/test_runners.py:186
Methodtest_basic_function_schema_conversion
Test basic function schema conversion with simple types.
tests/lib/tools/test_functions.py:18
Methodtest_basic_initialization_with_api_key
Test basic client initialization with API key.
tests/lib/test_azure.py:20
Methodtest_basic_initialization_with_api_key
Test basic async client initialization with API key.
tests/lib/test_azure.py:127
Methodtest_basic_response
(self, respx_mock: MockRouter)
tests/lib/streaming/test_messages.py:258
Methodtest_basic_response
(self, respx_mock: MockRouter)
tests/lib/streaming/test_messages.py:557
Methodtest_basic_response
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:416
Methodtest_basic_response
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:736
Methodtest_basic_union_response
(self, respx_mock: MockRouter, client: Anthropic)
tests/test_client.py:1052
Methodtest_basic_union_response
(self, respx_mock: MockRouter, async_client: AsyncAnthropic)
tests/test_client.py:2490
Methodtest_batch_create
(self, body: dict[str, Any], raw: bool, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:7876
Methodtest_batch_create_starts_its_span_with_the_request_count
(self, beta: bool, respx_mock: MockRouter)
tests/test_open_telemetry.py:2666
Methodtest_batch_create_without_requests_reaches_the_api
( self, sync: bool, beta: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:8081
Methodtest_batch_methods_record_the_batch_id_that_they_are_given
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:2783
Methodtest_batch_results_download_failure_fails_the_span
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:1116
Methodtest_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
Methodtest_batch_results_on_another_host_has_that_host_in_its_url
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:3673
Methodtest_batch_results_span_covers_the_download
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:1090
Methodtest_batches_keep_the_header
( self, send: SendBatch, client: AnthropicBedrockMantle, respx_mock: MockRouter )
tests/lib/test_bedrock_mantle.py:784
Methodtest_batches_send_no_header_when_no_profile_is_set
( self, send: SendBatch, client: AnthropicBedrockMantle, respx_mock: MockRouter )
tests/lib/test_bedrock_mantle.py:810
Methodtest_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
Functiontest_bearer_token_not_in_debug_logs
(respx_mock: MockRouter, caplog: pytest.LogCaptureFixture)
tests/lib/test_google_cloud.py:636
Methodtest_bearer_token_type_case_insensitive
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:1425
Methodtest_bedrock_fallback_middleware_retries_with_new_model
(self, respx_mock: MockRouter)
tests/test_middleware.py:2073
Methodtest_bedrock_mantle_runner_never_threads
(self, respx_mock: MockRouter)
tests/lib/threads/test_tool_runner_threading.py:823
Methodtest_bedrock_middleware_sees_canonical_request
(self, respx_mock: MockRouter)
tests/test_middleware.py:1949
Methodtest_bedrock_runner_never_threads
(self, respx_mock: MockRouter)
tests/lib/threads/test_tool_runner_threading.py:801
Methodtest_beta_files_not_available
(self)
tests/lib/test_bedrock_mantle.py:204
Methodtest_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:2577
Methodtest_beta_header_not_duplicated
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:2564
Methodtest_beta_messages_available
(self)
tests/lib/test_bedrock_mantle.py:196
Functiontest_beta_messages_helpers_are_bound
()
tests/lib/test_bedrock.py:840
Methodtest_beta_messages_helpers_are_bound
(self)
tests/lib/test_vertex.py:656
Methodtest_beta_messages_helpers_are_bound
(self)
tests/lib/test_vertex.py:1191
Functiontest_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
Functiontest_beta_messages_raw_response
(platform: str, method: str, sync: bool)
tests/lib/test_platform_resources.py:120
Methodtest_beta_models_not_available
(self)
tests/lib/test_bedrock_mantle.py:200
Methodtest_beta_skills_not_available
(self)
tests/lib/test_bedrock_mantle.py:208
Functiontest_beta_tool_runner_routes_through_invoke
(respx_mock: MockRouter)
tests/lib/test_bedrock.py:787
Functiontest_beta_tool_runner_routes_through_invoke_async
(respx_mock: MockRouter)
tests/lib/test_bedrock.py:815
Methodtest_beta_tool_runner_routes_through_raw_predict
(self, respx_mock: MockRouter)
tests/lib/test_vertex.py:632
Methodtest_beta_tool_runner_routes_through_raw_predict
(self, respx_mock: MockRouter)
tests/lib/test_vertex.py:1167
Functiontest_betas_param_and_extra_headers_case_variant
(respx_mock: MockRouter)
tests/lib/test_bedrock.py:948
← previousnext →5,501–5,600 of 12,274, ranked by callers