Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anthropics/anthropic-sdk-python
/ functions
Functions
12,274 in github.com/anthropics/anthropic-sdk-python
⨍
Functions
12,274
◇
Types & classes
3,937
↳
Endpoints
46
Method
test_no_expiry_never_refreshes
(self)
tests/lib/test_credentials.py:1639
Function
test_no_header_without_a_user_profile_id
(respx_mock: MockRouter)
tests/lib/test_bedrock.py:1130
Method
test_no_input_messages_are_an_empty_list_even_when_the_other_content_attributes_exceed_the_limit
( self, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:6684
Method
test_no_middleware_behavior_unchanged
(self, respx_mock: MockRouter)
tests/test_middleware.py:1321
Method
test_no_middleware_behavior_unchanged
(self, respx_mock: MockRouter)
tests/test_middleware.py:1856
Function
test_no_model_rebuild_override_when_pydantic_locks_it
()
tests/test_models.py:1128
Function
test_no_numeric_bound_is_applied_beyond_the_generated_types
()
tests/lib/tools/toolsets/test_computer_pipeline.py:194
Method
test_no_request_option_drops_or_repeats_the_helper_tag
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:252
Method
test_no_retry_on_non_401_error
Non-401 errors from the provider are not retried.
tests/lib/test_credentials.py:1745
Method
test_no_spans_without_a_tracer
(self, spans: Spans, respx_mock: MockRouter)
tests/lib/tools/test_open_telemetry.py:2120
Method
test_no_spurious_env_shadow_warning
( self, monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture )
tests/lib/test_google_cloud.py:391
Method
test_no_stop_sequences_set_no_attribute
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:6746
Method
test_no_supported_mime_raises
(self)
tests/lib/tools/test_mcp_tool.py:238
Method
test_no_url_query_when_no_defined_parameter_is_sent
( self, beta: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:3440
Method
test_no_warning_when_output_format_not_provided
Verify no deprecation warning when output_format is not used.
tests/api_resources/beta/test_output_format_conversion.py:142
Method
test_no_warning_when_using_output_config
Verify no deprecation warning when using output_config.format directly.
tests/api_resources/beta/test_output_format_conversion.py:168
Method
test_no_x_api_key_with_azure_ad_token_provider
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_azure.py:246
Method
test_non_401_omits_hint
The hint is 401-specific; a 5xx or 400 shouldn't suggest a config change.
tests/lib/test_credentials.py:1386
Method
test_non_anthropic_error_from_provider_releases_waiters
A non-`AnthropicError` / non-`httpx2.HTTPError` from the leader provider must still release `_refresh_event` so concurrent waiters don
tests/lib/test_credentials.py:4120
Method
test_non_application_json_content_type_for_json_data
Response that sets Content-Type to something other than application/json but returns json data
tests/test_client.py:1088
Method
test_non_application_json_content_type_for_json_data
Response that sets Content-Type to something other than application/json but returns json data
tests/test_client.py:2526
Method
test_non_bearer_token_type_rejected
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:1412
Method
test_non_json_response_does_not_retain_assertion
(self)
tests/lib/test_credentials.py:4916
Method
test_non_str_token_does_not_crash_repr
(self)
tests/lib/test_credentials.py:4800
Method
test_non_streaming
(self, sync_client: AnthropicGoogleCloud)
tests/lib/test_google_cloud_live.py:59
Method
test_non_streaming
(self, async_client: AsyncAnthropicGoogleCloud)
tests/lib/test_google_cloud_live.py:116
Method
test_non_streaming_runner_does_not_add_the_structured_outputs_beta
(self, respx_mock: MockRouter)
tests/lib/threads/test_tool_runner_threading.py:148
Method
test_none_path_param_is_rejected
(self, client: Anthropic)
tests/test_client.py:1230
Method
test_none_path_param_is_rejected
(self, async_client: AsyncAnthropic)
tests/test_client.py:2681
Method
test_nothing_is_logged_for_non_streaming_retries
( self, respx_mock: MockRouter, caplog: pytest.LogCaptureFixture )
tests/lib/test_refusal_fallback.py:1097
Method
test_nothing_set_returns_none
(self)
tests/lib/test_credentials.py:2377
Function
test_null_schema
()
tests/lib/_parse/test_transform.py:260
Function
test_object_schema
()
tests/lib/_parse/test_transform.py:159
Function
test_objects_with_a_read_method_are_not_files
(send: Send, monkeypatch: pytest.MonkeyPatch)
tests/test_prepare.py:633
Function
test_of_one_reports_changes_for_a_download_only_the_latest_reaches_the_model
()
tests/lib/tools/toolsets/test_pipeline.py:666
Function
test_of_the_changes_held_for_one_download_the_newest_is_the_one_carried_forward
()
tests/lib/tools/toolsets/test_pipeline.py:646
Method
test_oidc_federation
(self, respx_mock: MockRouter, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:3143
Method
test_oidc_federation_no_credentials_path_no_disk_cache
Without `authentication.credentials_path`, every call exchanges fresh — nothing is written to disk.
tests/lib/test_credentials.py:3192
Method
test_oidc_federation_with_credentials_path_disk_cache
With `authentication.credentials_path` set, the exchanged token is written to that path and a second call returns it without re-exchanging.
tests/lib/test_credentials.py:3213
Method
test_omit_headers_case_insensitive
(self, client: Anthropic)
tests/test_client.py:605
Method
test_omit_headers_case_insensitive
(self, async_client: AsyncAnthropic)
tests/test_client.py:2039
Method
test_omit_retry_count_header
( self, client: Anthropic, failures_before_success: int, respx_mock: MockRoute
tests/test_client.py:1390
Method
test_omit_retry_count_header
( self, async_client: AsyncAnthropic, failures_before_success: int, respx_mock
tests/test_client.py:2841
Function
test_omitted_fields
()
tests/test_models.py:505
Method
test_one_forced_call_per_invalidate_in_per_request_mode
P0 is a per-request call that starts before invalidate() and finishes after it.
tests/lib/test_credentials.py:3803
Method
test_one_input_part_over_the_bound_leaves_a_message_without_parts
( self, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:6256
Method
test_one_output_part_over_the_bound_is_cut_from_its_end
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:6239
Method
test_one_state_shared_across_threads
(self)
tests/lib/test_refusal_fallback.py:1054
Method
test_one_static_env_var_does_not_warn
( self, clean_env: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture, clien
tests/lib/test_credentials.py:4441
Method
test_one_streamed_output_part_over_the_bound_is_cut_from_its_end
( self, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:6157
Method
test_oneshot_exchange_failure_does_not_retain_assertion
`exchange_federation_assertion` holds the caller's assertion as a parameter in its own (SDK-owned) frame; it is rebound to SecretStr on
tests/lib/test_credentials.py:5197
Method
test_only_the_api_calls_of_a_tool_runner_have_http_and_url_attributes
( self, sync: bool, spans: Spans, respx_mock: MockRouter )
tests/lib/tools/test_open_telemetry.py:1857
Function
test_only_the_changed_memory_is_fetched
(tmp_path: Path)
tests/lib/tools/memory_sync/test_two_pass.py:46
Method
test_only_the_qualifier_marks_a_request_as_beta
( self, respx_mock: MockRouter, path: str, qualifiers: dict[str, str] | None, models: list[str] )
tests/lib/test_refusal_fallback.py:605
Function
test_open_calls_of_live_threads_run_beside_the_call_of_a_terminated_thread
Only the calls of the terminated thread are left out: the open calls of another child thread and of the primary thread still run and post.
tests/lib/tools/test_session_runner.py:1462
Method
test_option_disables_spans
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:2440
Function
test_option_types_are_exported
()
tests/test_open_telemetry.py:3734
Function
test_optional_list
()
tests/test_models.py:218
Function
test_optional_list_nested_model
()
tests/test_models.py:88
Function
test_optional_nested_model
()
tests/test_models.py:52
Function
test_options_do_not_leak_into_the_entry
()
tests/lib/tools/toolsets/test_interface.py:299
Function
test_options_do_not_leak_into_the_entry
()
tests/lib/tools/toolsets/test_computer_interface.py:214
Method
test_organization_route
(self, sync_client: AnthropicGoogleCloud)
tests/lib/test_google_cloud_live.py:94
Method
test_organization_route
(self, async_client: AsyncAnthropicGoogleCloud)
tests/lib/test_google_cloud_live.py:149
Method
test_organization_route_needs_no_workspace
(self, respx_mock: MockRouter)
tests/lib/test_google_cloud.py:1535
Method
test_organization_route_needs_no_workspace
(self, respx_mock: MockRouter)
tests/lib/test_google_cloud.py:1694
Method
test_organization_route_uses_organization_base
(self, respx_mock: MockRouter)
tests/lib/test_google_cloud.py:1511
Method
test_organization_route_uses_organization_base
(self, respx_mock: MockRouter)
tests/lib/test_google_cloud.py:1668
Function
test_original_schema_not_mutated
()
tests/lib/_parse/test_transform.py:272
Function
test_other_iterables_are_not_iterated
(send: Send, value: object)
tests/test_prepare.py:278
Method
test_other_methods
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:2503
Function
test_other_path_likes_are_not_read
(send: Send, file: object, monkeypatch: pytest.MonkeyPatch)
tests/test_prepare.py:652
Method
test_other_providers_do_not
(self)
tests/lib/test_credentials.py:200
Method
test_other_sessions_methods_do_not_have_the_agent_model_or_environment
( self, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:7540
Method
test_other_thread_rejections_raise_and_keep_previous_message_id
( self, respx_mock: MockRouter, rejection: httpx2.Response )
tests/lib/threads/test_beta_threads.py:430
Method
test_output_config_subfields_do_not_leak_into_the_next_hop
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:510
Method
test_output_config_subfields_patch_one_level_deep
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:410
Method
test_output_config_subfields_seed_a_missing_original
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:457
Method
test_output_format_adds_no_beta_beyond_the_threads_beta
( self, respx_mock: MockRouter, fields: dict[str, Any] )
tests/lib/threads/test_beta_threads.py:1446
Method
test_output_format_rejects_a_schema_dict
(self)
tests/lib/threads/test_beta_threads.py:1488
Method
test_output_type_is_json_when_the_request_sets_a_json_output_format
( self, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:2545
Method
test_output_type_is_json_when_the_runner_sets_a_json_output_format
( self, spans: Spans, respx_mock: MockRouter )
tests/lib/tools/test_open_telemetry.py:968
Function
test_override_detection_sees_dynamic_assignment_and_intermediate_classes
()
tests/lib/tools/toolsets/test_interface.py:280
Function
test_override_detection_sees_intermediate_classes_and_dynamic_assignment
()
tests/lib/tools/toolsets/test_computer_interface.py:196
Method
test_oversized_assertion_not_retained
(self)
tests/lib/test_credentials.py:4949
Method
test_oversized_assertion_rejected
(self)
tests/lib/test_credentials.py:1401
Method
test_oversized_response_body_rejected
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:1437
Method
test_overwrite_retry_count_header
( self, client: Anthropic, failures_before_success: int, respx_mock: MockRoute
tests/test_client.py:1428
Method
test_overwrite_retry_count_header
( self, async_client: AsyncAnthropic, failures_before_success: int, respx_mock
tests/test_client.py:2879
Function
test_page_and_model_text_is_folded_the_same_in_both_sdks
(fn: str, raw: str, shown: str)
tests/lib/tools/toolsets/test_pipeline.py:870
Method
test_params_includes_the_output_format
(self)
tests/lib/threads/test_beta_threads.py:1316
Method
test_params_is_the_whole_conversation_as_thread_arguments
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:1265
Method
test_params_returns_the_runnable_tools_as_given
(self)
tests/lib/threads/test_thread_tool_runner.py:164
Method
test_parse_caller_beta_header_overrides
(self, client: Anthropic, respx_mock: respx.MockRouter)
tests/lib/test_stainless_helpers.py:147
Method
test_parse_caller_beta_header_overrides
( self, async_client: AsyncAnthropic, respx_mock: respx.MockRouter )
tests/lib/test_stainless_helpers.py:249
Method
test_parse_continues_the_thread_and_parses_each_reply
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:1495
Method
test_parse_continues_the_thread_and_parses_each_reply
(self, respx_mock: MockRouter)
tests/lib/threads/test_async_beta_threads.py:730
Method
test_parse_converts_pydantic_to_output_config
Verify .parse() converts Pydantic models to output_config.format.
tests/api_resources/beta/test_output_format_conversion.py:18
Method
test_parse_does_not_add_beta_header
Verify .parse() sends no beta header when the caller passes no betas.
tests/api_resources/beta/test_output_format_conversion.py:219
Method
test_parse_does_not_warn_for_type
`.parse(output_format=Model)` is silent.
tests/api_resources/beta/test_output_format_conversion.py:77
← previous
next →
8,101–8,200 of 12,274, ranked by callers