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_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:3998
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:979
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:2280
Method
test_non_bearer_token_type_rejected
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:1352
Method
test_non_json_response_does_not_retain_assertion
(self)
tests/lib/test_credentials.py:4479
Method
test_non_str_token_does_not_crash_repr
(self)
tests/lib/test_credentials.py:4363
Method
test_non_streaming
(self, sync_client: AnthropicGoogleCloud)
tests/lib/test_google_cloud_live.py:58
Method
test_non_streaming
(self, async_client: AsyncAnthropicGoogleCloud)
tests/lib/test_google_cloud_live.py:95
Method
test_nothing_is_logged_for_non_streaming_retries
( self, respx_mock: MockRouter, caplog: pytest.LogCaptureFixture )
tests/lib/test_refusal_fallback.py:818
Method
test_nothing_set_returns_none
(self)
tests/lib/test_credentials.py:2244
Function
test_null_schema
()
tests/lib/_parse/test_transform.py:203
Function
test_object_schema
()
tests/lib/_parse/test_transform.py:102
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:3021
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:3070
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:3091
Method
test_omit_headers_case_insensitive
(self, client: Anthropic)
tests/test_client.py:496
Method
test_omit_headers_case_insensitive
(self, async_client: AsyncAnthropic)
tests/test_client.py:1793
Method
test_omit_retry_count_header
( self, client: Anthropic, failures_before_success: int, respx_mock: MockRoute
tests/test_client.py:1277
Method
test_omit_retry_count_header
( self, async_client: AsyncAnthropic, failures_before_success: int, respx_mock
tests/test_client.py:2591
Function
test_omitted_fields
()
tests/test_models.py:490
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:3681
Method
test_one_state_shared_across_threads
(self)
tests/lib/test_refusal_fallback.py:775
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:4760
Function
test_only_the_changed_memory_is_fetched
(tmp_path: Path)
tests/lib/tools/memory_sync/test_two_pass.py:46
Function
test_optional_list
()
tests/test_models.py:203
Function
test_optional_list_nested_model
()
tests/test_models.py:73
Function
test_optional_nested_model
()
tests/test_models.py:37
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
Function
test_original_schema_not_mutated
()
tests/lib/_parse/test_transform.py:215
Function
test_other_iterables_are_not_iterated
(send: Send, value: object)
tests/test_prepare.py:278
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:193
Method
test_output_config_subfields_do_not_leak_into_the_next_hop
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:488
Method
test_output_config_subfields_patch_one_level_deep
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:388
Method
test_output_config_subfields_seed_a_missing_original
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:435
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:4512
Method
test_oversized_assertion_rejected
(self)
tests/lib/test_credentials.py:1341
Method
test_oversized_response_body_rejected
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:1377
Method
test_overwrite_retry_count_header
( self, client: Anthropic, failures_before_success: int, respx_mock: MockRoute
tests/test_client.py:1315
Method
test_overwrite_retry_count_header
( self, async_client: AsyncAnthropic, failures_before_success: int, respx_mock
tests/test_client.py:2629
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_parse_caller_beta_header_overrides
(self, client: Anthropic, respx_mock: respx.MockRouter)
tests/lib/test_stainless_helpers.py:145
Method
test_parse_caller_beta_header_overrides
( self, async_client: AsyncAnthropic, respx_mock: respx.MockRouter )
tests/lib/test_stainless_helpers.py:245
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:218
Method
test_parse_does_not_warn_for_type
`.parse(output_format=Model)` is silent.
tests/api_resources/beta/test_output_format_conversion.py:76
Method
test_parse_in_middleware_shares_parse_cache
(self, respx_mock: MockRouter)
tests/test_middleware.py:1027
Method
test_parse_in_middleware_shares_parse_cache
(self, respx_mock: MockRouter)
tests/test_middleware.py:1552
Method
test_parse_merges_caller_extra_headers
(self, client: Anthropic, respx_mock: respx.MockRouter)
tests/lib/test_stainless_helpers.py:123
Method
test_parse_merges_caller_extra_headers
( self, async_client: AsyncAnthropic, respx_mock: respx.MockRouter )
tests/lib/test_stainless_helpers.py:224
Function
test_parse_method_definition_in_sync
(sync: bool)
tests/lib/streaming/test_beta_messages.py:937
Method
test_parse_rejects_both_output_format_and_config
Verify .parse() raises error when both output_format and output_config.format are provided.
tests/api_resources/beta/test_output_format_conversion.py:198
Method
test_parse_retry_after_header
( self, remaining_retries: int, retry_after: str, timeout: float, clie
tests/test_client.py:1175
Method
test_parse_retry_after_header
( self, remaining_retries: int, retry_after: str, timeout: float, asyn
tests/test_client.py:2489
Method
test_parse_sends_caller_betas_unchanged
Verify .parse() sends exactly the betas the caller passes.
tests/api_resources/beta/test_output_format_conversion.py:250
Method
test_parse_sends_explicit_structured_outputs_beta_once
Verify .parse() sends the structured-outputs beta once when the caller passes it.
tests/api_resources/beta/test_output_format_conversion.py:283
Method
test_parse_sends_single_header_line
(self, client: Anthropic, respx_mock: respx.MockRouter)
tests/lib/test_stainless_helpers.py:97
Method
test_parse_sends_single_header_line
( self, async_client: AsyncAnthropic, respx_mock: respx.MockRouter )
tests/lib/test_stainless_helpers.py:196
Method
test_parse_uses_output_config
(self, async_snapshot_client: AsyncAnthropic)
tests/lib/_parse/test_beta_messages.py:55
Method
test_parse_with_nested_pydantic_model
Test sync messages.parse() with nested Pydantic models.
tests/lib/_parse/test_messages.py:56
Method
test_parse_with_nested_pydantic_model
Test async messages.parse() with nested Pydantic models.
tests/lib/_parse/test_messages.py:113
Method
test_parse_with_pydantic_model
Test sync messages.parse() with a Pydantic model output_format.
tests/lib/_parse/test_messages.py:29
Method
test_parse_with_pydantic_model
Test async messages.parse() with a Pydantic model output_format.
tests/lib/_parse/test_messages.py:86
Function
test_parsed_output_is_readable_but_not_dumped
(block_type: Any)
tests/lib/streaming/test_parsed_content_blocks.py:104
Function
test_parsed_union_matches_generated_union
The hand-written Parsed*ContentBlock unions must track the generated unions. If a block type only exists in the generated union, streaming snapsh
tests/lib/streaming/test_parsed_content_blocks.py:48
Function
test_partial_creds_access_key_only
()
tests/lib/test_aws.py:100
Function
test_partial_creds_async_access_key_only
()
tests/lib/test_aws.py:110
Function
test_partial_creds_secret_key_only
()
tests/lib/test_aws.py:105
Method
test_partial_json_with_invalid_json
Test that invalid JSON raises an error.
tests/lib/streaming/test_partial_json.py:108
Method
test_partial_of_a_callable_object_is_awaited
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:3477
Method
test_pass_through_preserves_sse_fields_beyond_event_and_data
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:529
Method
test_path_params_ack
(self, client: Anthropic)
tests/api_resources/beta/environments/test_work.py:237
Method
test_path_params_ack
(self, async_client: AsyncAnthropic)
tests/api_resources/beta/environments/test_work.py:684
Method
test_path_params_add
(self, client: Anthropic)
tests/api_resources/beta/sessions/test_resources.py:304
Method
test_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/beta/sessions/test_resources.py:597
Method
test_path_params_add
(self, client: Anthropic)
tests/api_resources/beta/organization/federation/rules/test_workspaces.py:114
Method
test_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/beta/organization/federation/rules/test_workspaces.py:276
Method
test_path_params_add
(self, client: Anthropic)
tests/api_resources/beta/organization/workspaces/test_members.py:209
Method
test_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/beta/organization/workspaces/test_members.py:458
Method
test_path_params_add
(self, client: Anthropic)
tests/api_resources/beta/organization/workspaces/test_service_accounts.py:238
Method
test_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/beta/organization/workspaces/test_service_accounts.py:525
Method
test_path_params_add
(self, client: Anthropic)
tests/api_resources/beta/organization/rbac_groups/test_members.py:104
Method
test_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/beta/organization/rbac_groups/test_members.py:247
Method
test_path_params_add
(self, client: Anthropic)
tests/api_resources/beta/organization/service_accounts/test_workspaces.py:118
Method
test_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/beta/organization/service_accounts/test_workspaces.py:285
Method
test_path_params_add
(self, client: Anthropic)
tests/api_resources/organization/federation/rules/test_workspaces.py:104
Method
test_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/organization/federation/rules/test_workspaces.py:247
Method
test_path_params_add
(self, client: Anthropic)
tests/api_resources/organization/workspaces/test_members.py:209
Method
test_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/organization/workspaces/test_members.py:458
Method
test_path_params_add
(self, client: Anthropic)
tests/api_resources/organization/workspaces/test_service_accounts.py:208
Method
test_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/organization/workspaces/test_service_accounts.py:456
Method
test_path_params_add
(self, client: Anthropic)
tests/api_resources/organization/service_accounts/test_workspaces.py:107
Method
test_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/organization/service_accounts/test_workspaces.py:254
Method
test_path_params_approve
(self, client: Anthropic)
tests/api_resources/beta/organization/spend_limits/test_increase_requests.py:142
← previous
next →
6,301–6,400 of 9,455, ranked by callers