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
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
Function
test_output_format_schema_not_shared_between_calls
()
tests/lib/_parse/test_transform.py:292
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:1445
Method
test_overwrite_retry_count_header
( self, async_client: AsyncAnthropic, failures_before_success: int, respx_mock
tests/test_client.py:2913
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
Method
test_parse_forwards_speed
Test sync messages.parse() sends speed in the request body.
tests/lib/_parse/test_messages.py:92
Method
test_parse_forwards_speed
Test async messages.parse() sends speed in the request body.
tests/lib/_parse/test_messages.py:164
Method
test_parse_gets_the_fallback
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:624
Method
test_parse_gets_the_fallback
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:819
Method
test_parse_helper_has_the_clients
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:4591
Method
test_parse_in_middleware_shares_parse_cache
(self, respx_mock: MockRouter)
tests/test_middleware.py:1028
Method
test_parse_in_middleware_shares_parse_cache
(self, respx_mock: MockRouter)
tests/test_middleware.py:1551
Method
test_parse_merges_caller_extra_headers
(self, client: Anthropic, respx_mock: respx.MockRouter)
tests/lib/test_stainless_helpers.py:125
Method
test_parse_merges_caller_extra_headers
( self, async_client: AsyncAnthropic, respx_mock: respx.MockRouter )
tests/lib/test_stainless_helpers.py:228
Function
test_parse_method_definition_in_sync
(sync: bool)
tests/lib/streaming/test_beta_messages.py:1056
Method
test_parse_of_a_reply_that_does_not_fit_the_output_format_keeps_the_turn
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:1551
Method
test_parse_of_a_reply_that_does_not_fit_the_output_format_keeps_the_turn
( self, respx_mock: MockRouter )
tests/lib/threads/test_async_beta_threads.py:774
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:199
Method
test_parse_retry_after_header
( self, remaining_retries: int, retry_after: str, timeout: float, clie
tests/test_client.py:1305
Method
test_parse_retry_after_header
( self, remaining_retries: int, retry_after: str, timeout: float, asyn
tests/test_client.py:2773
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:251
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:284
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:198
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:71
Method
test_parse_with_nested_pydantic_model
Test async messages.parse() with nested Pydantic models.
tests/lib/_parse/test_messages.py:143
Method
test_parse_with_pydantic_model
Test sync messages.parse() with a Pydantic model output_format.
tests/lib/_parse/test_messages.py:44
Method
test_parse_with_pydantic_model
Test async messages.parse() with a Pydantic model output_format.
tests/lib/_parse/test_messages.py:116
Method
test_parse_without_output_format_returns_no_parsed_output
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:1516
Function
test_parsed_output_is_readable_but_not_dumped
(block_type: Any)
tests/lib/streaming/test_parsed_content_blocks.py:104
Method
test_parsed_reply_has_the_request_and_workspace_ids_of_its_response
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:1530
Method
test_parsed_reply_has_the_request_and_workspace_ids_of_its_response
(self, respx_mock: MockRouter)
tests/lib/threads/test_async_beta_threads.py:753
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:3599
Method
test_partial_output_is_content
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:5724
Method
test_parts_and_the_cut_of_the_last_text_part_are_measured_in_bytes
( self, limit: int, input_parts: list[dict[str, Any]], output_characters: int,
tests/test_open_telemetry.py:6893
Method
test_pass_through_preserves_sse_fields_beyond_event_and_data
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:561
Method
test_passed_credential_ignores_the_environment
( self, respx_mock: MockRouter, clean_env: pytest.MonkeyPatch, caplog: pytest.
tests/lib/test_credentials.py:4324
Method
test_path_params_ack
(self, client: Anthropic)
tests/api_resources/beta/environments/test_work.py:253
Method
test_path_params_ack
(self, async_client: AsyncAnthropic)
tests/api_resources/beta/environments/test_work.py:732
Method
test_path_params_activate
(self, client: Anthropic)
tests/api_resources/beta/organization/test_external_storage.py:328
Method
test_path_params_activate
(self, async_client: AsyncAnthropic)
tests/api_resources/beta/organization/test_external_storage.py:646
Method
test_path_params_add
(self, client: Anthropic)
tests/api_resources/beta/sessions/test_resources.py:324
Method
test_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/beta/sessions/test_resources.py:637
Method
test_path_params_add
(self, client: Anthropic)
tests/api_resources/beta/organization/federation/rules/test_workspaces.py:122
Method
test_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/beta/organization/federation/rules/test_workspaces.py:296
Method
test_path_params_add
(self, client: Anthropic)
tests/api_resources/beta/organization/workspaces/test_members.py:222
Method
test_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/beta/organization/workspaces/test_members.py:487
Method
test_path_params_add
(self, client: Anthropic)
tests/api_resources/beta/organization/workspaces/test_service_accounts.py:254
Method
test_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/beta/organization/workspaces/test_service_accounts.py:561
Method
test_path_params_add
(self, client: Anthropic)
tests/api_resources/beta/organization/rbac_groups/test_members.py:111
Method
test_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/beta/organization/rbac_groups/test_members.py:264
Method
test_path_params_add
(self, client: Anthropic)
tests/api_resources/beta/organization/telemetry_destinations/test_workspaces.py:122
Method
test_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/beta/organization/telemetry_destinations/test_workspaces.py:302
Method
test_path_params_add
(self, client: Anthropic)
tests/api_resources/beta/organization/service_accounts/test_workspaces.py:126
← previous
next →
8,301–8,400 of 12,522, ranked by callers