Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anthropics/anthropic-sdk-python
/ functions
Functions
12,522 in github.com/anthropics/anthropic-sdk-python
⨍
Functions
12,522
◇
Types & classes
4,093
↳
Endpoints
47
Method
test_multipart_content_type_case_insensitive
(self, client: Anthropic)
tests/test_client.py:636
Method
test_multipart_content_type_case_insensitive
(self, async_client: AsyncAnthropic)
tests/test_client.py:2089
Method
test_multipart_media_type_is_matched_case_insensitively
(self)
tests/test_header_case_sensitivity.py:313
Method
test_multipart_repeating_array
(self, client: Anthropic)
tests/test_client.py:984
Method
test_multipart_repeating_array
(self, async_client: AsyncAnthropic)
tests/test_client.py:2439
Function
test_multiple_data_lines
(sync: bool, client: Anthropic, async_client: AsyncAnthropic)
tests/test_streaming.py:165
Function
test_multiple_data_lines_with_empty_line
(sync: bool, client: Anthropic, async_client: AsyncAnthropic)
tests/test_streaming.py:126
Function
test_multiple_events
(sync: bool, client: Anthropic, async_client: AsyncAnthropic)
tests/test_streaming.py:80
Function
test_multiple_events_with_data
(sync: bool, client: Anthropic, async_client: AsyncAnthropic)
tests/test_streaming.py:102
Function
test_multiple_files
()
tests/test_extract_files.py:29
Function
test_multiple_params
()
tests/test_required_args.py:43
Function
test_multiple_params_multiple_variants
()
tests/test_required_args.py:89
Method
test_multiple_paths
(self)
tests/test_files.py:154
Function
test_multiple_variants
()
tests/test_required_args.py:71
Function
test_navigate_and_screenshot_results_render_from_their_models
()
tests/lib/tools/toolsets/test_pipeline.py:785
Function
test_navigate_line_folds_control_characters_and_omits_absent_fields
()
tests/lib/tools/toolsets/test_pipeline.py:78
Function
test_navigate_renders_one_line_and_attaches_the_browser_state_block
()
tests/lib/tools/toolsets/test_pipeline.py:59
Method
test_neither_provided_passes
(self)
tests/lib/test_aws_auth.py:25
Method
test_nested_array_path_copies_list_and_elements
(self)
tests/test_files.py:137
Function
test_nested_brackets
()
tests/test_qs.py:49
Function
test_nested_dictionary_model
()
tests/test_models.py:150
Function
test_nested_discriminated_union
()
tests/test_models.py:1008
Function
test_nested_dotted
(method: str)
tests/test_qs.py:37
Function
test_nested_union_invalid_data
()
tests/test_models.py:298
Function
test_nested_union_multiple_variants
()
tests/test_models.py:270
Function
test_nested_union_of_mixed_types
()
tests/test_models.py:252
Function
test_nested_union_of_models
()
tests/test_models.py:237
Method
test_nesting_different_states_restores_the_outer_pin
(self)
tests/lib/test_refusal_fallback.py:1046
Function
test_never_runs_the_call_that_was_cut_off_by
(setup: SetupFactory, cut_off_reply: Callable[[], Reply])
tests/lib/tools/test_runner_eager_tools.py:675
Function
test_new_event_resets_idle_grace
()
tests/lib/tools/test_session_runner.py:1301
Function
test_new_index_inserts_the_fragment_as_a_fresh_block
()
tests/lib/sessions/test_accumulate.py:72
Function
test_new_lines_in_json
( sync: bool, )
tests/decoders/test_jsonl.py:36
Method
test_next_force_preserved_on_provider_failure
If invalidate() set the force flag and the provider then raises, the flag must NOT be consumed — a subsequent retry must still see for
tests/lib/test_credentials.py:1983
Method
test_next_force_preserved_on_provider_failure
(self)
tests/lib/test_credentials.py:3725
Method
test_next_force_preserved_when_provider_returns_non_token
A rejected provider return does not consume the force flag set by invalidate().
tests/lib/test_credentials.py:2006
Method
test_next_force_preserved_when_provider_returns_non_token
(self)
tests/lib/test_credentials.py:3741
Method
test_next_send_continues_the_thread_with_only_the_new_messages
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:126
Function
test_next_sequential_index_inserts
()
tests/lib/sessions/test_accumulate.py:107
Function
test_no_api_key_leak
(respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_google_cloud.py:1086
Function
test_no_api_key_leak_async
(respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_google_cloud.py:1106
Method
test_no_args_no_env_defaults_to_sigv4
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:97
Function
test_no_auth_token_leak
(respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_google_cloud.py:1125
Function
test_no_auth_token_leak_async
(respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_google_cloud.py:1144
Method
test_no_compaction_tokens_without_a_compaction
( self, iterations: list[dict[str, Any]] | None, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:2037
Function
test_no_environment_key_threads_none_to_scoped_client
Without an environment key the runner still asks `_scoped_client` for a request client — passing `None` so the factory returns the parent client
tests/lib/tools/test_session_runner.py:2056
Method
test_no_expiry_never_refreshes
(self)
tests/lib/test_credentials.py:1639
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:1147
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:1105
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:2560
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:1247
Method
test_none_path_param_is_rejected
(self, async_client: AsyncAnthropic)
tests/test_client.py:2715
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:2056
Method
test_omit_retry_count_header
( self, client: Anthropic, failures_before_success: int, respx_mock: MockRoute
tests/test_client.py:1407
Method
test_omit_retry_count_header
( self, async_client: AsyncAnthropic, failures_before_success: int, respx_mock
tests/test_client.py:2875
Function
test_omitted_fields
()
tests/test_models.py:524
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
← previous
next →
8,201–8,300 of 12,522, ranked by callers