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
Function
test_unimplemented_members_are_sent_as_disabled_and_implemented_ones_left_to_the_api
()
tests/lib/tools/toolsets/test_computer_interface.py:67
Function
test_union_of_dict
()
tests/test_models.py:405
Function
test_union_of_lists
()
tests/test_models.py:329
Method
test_union_response_different_types
Union of objects with the same field name using a different type
tests/test_client.py:957
Method
test_union_response_different_types
Union of objects with the same field name using a different type
tests/test_client.py:2258
Function
test_unknown_array_format
()
tests/test_qs.py:88
Function
test_unknown_block_type_pair_is_a_noop_forward_compat
()
tests/lib/sessions/test_accumulate.py:163
Function
test_unknown_event_type_passes_the_snapshot_through_forward_compat
()
tests/lib/sessions/test_accumulate.py:173
Function
test_unknown_fields
()
tests/test_models.py:148
Function
test_unknown_fragment_type_on_an_existing_index_is_a_noop_forward_compat
()
tests/lib/sessions/test_accumulate.py:182
Function
test_unknown_member_name_is_sanitised_in_the_refusal
()
tests/lib/tools/toolsets/test_interface.py:235
Function
test_unknown_tool_skipped_by_default
An unregistered tool name is assumed to belong to the other client servicing the session, so it is skipped — not answered in place. The call i
tests/lib/tools/test_session_runner.py:385
Method
test_unknown_type
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:762
Method
test_unknown_type_rejected
(self)
tests/lib/test_credentials.py:3167
Function
test_unnamed_file_tuple_uses_base_name
()
tests/test_files.py:66
Function
test_unrecognised_permission_fails_closed
An `evaluated_permission` value this SDK doesn't recognise must not dispatch unconfirmed — it is held like `ask` and released only by an expli
tests/lib/tools/test_session_runner.py:1005
Function
test_unrecognised_verdict_fails_closed
The gate is an allow-list: a confirmation whose `result` is a value this SDK doesn't recognise (the wire can carry values newer than our types
tests/lib/tools/test_session_runner.py:976
Method
test_unrecognized_top_level_keys_ignored
Unknown top-level keys in both files are silently ignored (forward compat).
tests/lib/test_credentials.py:315
Function
test_unregistered_family_is_error_result_with_toolset_name_async
( async_client: AsyncAnthropic, respx_mock: MockRouter )
tests/lib/tools/toolsets/test_runner.py:589
Function
test_unregistered_family_is_error_result_with_toolset_name_sync
(client: Anthropic, respx_mock: MockRouter)
tests/lib/tools/toolsets/test_runner.py:258
Function
test_unregistered_family_names_are_folded_before_they_reach_a_log_or_the_result
( client: Anthropic, async_client: AsyncAnthropic, respx_mock: MockRouter, flavour: str )
tests/lib/tools/toolsets/test_runner.py:297
Function
test_unrestricted_paths_is_rejected_at_construction
(value: bool)
tests/lib/environments/test_worker.py:934
Function
test_unrestricted_paths_is_rejected_with_guidance
(tmp_path: Path, value: bool)
tests/lib/tools/test_agent_toolset.py:56
Function
test_unset_checks_nothing
()
tests/lib/tools/toolsets/test_enforcement.py:141
Method
test_unsetting_every_output_config_subfield_drops_the_key
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:453
Function
test_unsupported_type_asserts
()
tests/lib/_parse/test_transform.py:209
Function
test_until_done_drives_runner_to_completion
`until_done()` (renamed from `run()` to match `BetaToolRunner` and avoid colliding with `EnvironmentWorker.run`'s forever-loop) drives the run
tests/lib/tools/test_session_runner.py:1727
Function
test_until_done_returns_the_final_turn_after_a_compaction_without_a_summary_async
( respx_mock: MockRouter, )
tests/lib/tools/test_runners.py:3091
Function
test_until_done_returns_the_final_turn_after_a_compaction_without_a_summary_sync
( respx_mock: MockRouter, )
tests/lib/tools/test_runners.py:3068
Function
test_upload_dotdot_component_is_refused
A `..` component is refused before resolution, so it cannot survive into the not-yet-existing tail and let a lexical containment check pass a path
tests/lib/tools/toolsets/test_security.py:77
Function
test_upload_path_table
(tmp_path: Path)
tests/lib/tools/toolsets/test_security.py:27
Function
test_upload_refusals
(tmp_path: Path)
tests/lib/tools/toolsets/test_refusals.py:154
Function
test_upload_root_that_does_not_exist_grants_nothing
(tmp_path: Path)
tests/lib/tools/toolsets/test_security.py:244
Function
test_upload_sibling_prefix_is_not_a_root_match
(tmp_path: Path)
tests/lib/tools/toolsets/test_security.py:69
Function
test_uploads_are_refused_without_a_file_policy_and_resolved_with_one
(tmp_path: Path)
tests/lib/tools/toolsets/test_enforcement.py:224
Method
test_uppercases_method
Method should be uppercased for signing.
tests/lib/test_aws_auth.py:570
Function
test_url_policy_is_a_callable_or_unset
()
tests/lib/tools/toolsets/test_interface.py:189
Function
test_url_refusals
()
tests/lib/tools/toolsets/test_refusals.py:92
Method
test_us_region_base_url
Test that us region uses the correct base URL.
tests/lib/test_vertex.py:191
Method
test_us_region_base_url
Test that us region uses the correct base URL.
tests/lib/test_vertex.py:385
Method
test_usage_iterations_is_the_two_entry_server_shape
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:258
Method
test_user_message
(self)
tests/lib/tools/test_mcp_tool.py:177
Method
test_user_oauth_malformed_expires_at_raises_anthropic_error
An ISO8601 string in `expires_at` must raise AnthropicError naming the expected shape.
tests/lib/test_credentials.py:3982
Method
test_user_oauth_refresh_and_writeback
user_oauth with `credentials_path` runs the refresh-token grant on expiry and writes the new tokens back, exactly like a file-backed `
tests/lib/test_credentials.py:3127
Method
test_user_oauth_requires_credentials_path
(self)
tests/lib/test_credentials.py:3122
Method
test_user_oauth_with_client_id_missing_refresh_token
A user_oauth profile that has a client_id (refresh mode) but no refresh_token in the credentials file can't actually refresh — raise a
tests/lib/test_credentials.py:747
Method
test_user_oauth_without_client_id_is_static
user_oauth without a client_id is the `external` pattern: the credentials file is externally rotated, the SDK re-reads it on every cal
tests/lib/test_credentials.py:704
Function
test_user_strings_are_not_iterated
(send: Send)
tests/test_prepare.py:329
Method
test_uses_base_url_env_var
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_bedrock_mantle.py:46
Method
test_uses_bedrock_mantle_service_name
(self, get_auth_headers_recorder: GetAuthHeadersRecorder)
tests/lib/test_bedrock_mantle.py:69
Method
test_uses_mantle_api_key_env_var
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_bedrock_mantle.py:90
Method
test_uses_service_name_parameter
service_name is passed through to SigV4Auth, not hardcoded.
tests/lib/test_aws_auth.py:438
Method
test_validate_headers
(self)
tests/test_client.py:449
Method
test_validate_headers
(self)
tests/test_client.py:1746
Method
test_validate_path_returns_resolved_path_not_symlink_target
_validate_path must return the resolved path so that subsequent file operations hit the real location, not the (potentially swappable) symlink
tests/lib/tools/memory_tools/test_filesystem.py:1069
Method
test_value_error_from_provider_propagates_cleanly
A `ValueError` (e.g. from a provider that parses a JWT) escapes but the cache state is clean — the next call succeeds without hanging.
tests/lib/test_credentials.py:4056
Function
test_value_types_construct
()
tests/lib/tools/toolsets/test_surface.py:127
Function
test_value_types_construct
()
tests/lib/tools/toolsets/test_computer_surface.py:88
Method
test_var_keyword_provider_receives_force_refresh
(self)
tests/lib/test_credentials.py:1910
Method
test_vertex_middleware_sees_canonical_request
(self, respx_mock: MockRouter)
tests/test_middleware.py:1997
Method
test_view_directory
(self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:137
Method
test_view_directory
(self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:660
Method
test_view_error_for_files_with_too_many_lines
( self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:189
Method
test_view_error_for_files_with_too_many_lines
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:714
Method
test_view_error_for_non_existent_file
(self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:181
Method
test_view_error_for_non_existent_file
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:704
Method
test_view_file
(self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:120
Method
test_view_file
(self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:643
Method
test_view_file_with_range
(self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:163
Method
test_view_file_with_range
(self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:686
Method
test_view_preserves_crlf_line_endings
(self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:344
Method
test_view_preserves_crlf_line_endings
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:871
Method
test_walks_each_hop_through_the_chain_until_a_model_accepts
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:225
Method
test_walks_each_hop_through_the_chain_until_a_model_accepts
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:742
Method
test_warns_once_when_falling_back_without_a_state
( self, respx_mock: MockRouter, caplog: pytest.LogCaptureFixture )
tests/lib/test_refusal_fallback.py:173
Method
test_warns_once_when_falling_back_without_a_state
( self, respx_mock: MockRouter, caplog: pytest.LogCaptureFixture )
tests/lib/test_refusal_fallback_streaming.py:665
Function
test_windows_network_and_device_paths_are_refused_lexically_on_windows
Refused before the filesystem is touched: resolving a UNC path makes the Windows redirector authenticate to the named host, and a DOS device name
tests/lib/tools/toolsets/test_security.py:206
Method
test_with_expiry
(self)
tests/lib/test_credentials.py:182
Method
test_with_middleware_appends_without_mutating_original
(self)
tests/test_middleware.py:1243
Method
test_with_middleware_client_runs_appended_middleware_innermost
(self, respx_mock: MockRouter)
tests/test_middleware.py:1265
Method
test_with_middleware_client_runs_appended_middleware_innermost
(self, respx_mock: MockRouter)
tests/test_middleware.py:1837
Method
test_with_middleware_validates_like_the_constructor
(self)
tests/test_middleware.py:1255
Method
test_with_options
(self)
tests/lib/test_vertex.py:113
Method
test_with_options
(self)
tests/lib/test_vertex.py:307
Method
test_with_options_alias
(self)
tests/lib/test_credentials.py:2750
Method
test_with_options_append_idiom
(self, respx_mock: MockRouter)
tests/test_middleware.py:1898
Method
test_with_options_client_runs_inherited_middleware
(self, respx_mock: MockRouter)
tests/test_middleware.py:1292
Method
test_with_options_does_not_accumulate_case_variants
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:189
Method
test_with_options_headers_case_insensitive
(self, client: Anthropic)
tests/test_client.py:520
Method
test_with_options_headers_case_insensitive
(self, async_client: AsyncAnthropic)
tests/test_client.py:1817
Method
test_with_options_omit_removes_default_header_case_insensitively
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:157
Method
test_with_options_overrides
Test with_options() applies overrides while keeping everything else.
tests/lib/test_azure.py:89
Method
test_with_options_replaces_default_header_case_insensitively
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:179
Method
test_with_raw_response_flows_through_middleware
(self, respx_mock: MockRouter)
tests/test_middleware.py:1045
Method
test_with_raw_response_flows_through_middleware
(self, respx_mock: MockRouter)
tests/test_middleware.py:1570
Method
test_with_raw_response_middleware_sees_api_response
(self, respx_mock: MockRouter)
tests/test_middleware.py:1063
Method
test_with_raw_response_middleware_sees_api_response
(self, respx_mock: MockRouter)
tests/test_middleware.py:1588
Method
test_with_streaming_response_middleware_sees_api_response
(self, respx_mock: MockRouter)
tests/test_middleware.py:1090
Method
test_with_streaming_response_middleware_sees_api_response
(self, respx_mock: MockRouter)
tests/test_middleware.py:1615
Function
test_without_the_option_every_tool_runs_after_the_loop_body_as_before
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_tools.py:164
← previous
next →
8,601–8,700 of 9,455, ranked by callers