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_config_dict_base_url_adopted_by_client
Outbound, `config=` path: `Anthropic(config={"base_url": ...})` adopts the dict's `base_url` for API requests when no kwarg/env is set
tests/lib/test_credentials.py:2551
Method
test_config_dir_env_triggers_tier1
ANTHROPIC_CONFIG_DIR set → tier 1 fires even if dir is empty (explicit opt-in).
tests/lib/test_credentials.py:2097
Method
test_config_file_group_or_other_writable_rejected
(self, tmp_path: pathlib.Path, mode: int)
tests/lib/test_credentials.py:875
Method
test_config_file_not_writable_by_others_accepted
(self, tmp_path: pathlib.Path, mode: int)
tests/lib/test_credentials.py:884
Method
test_config_file_symlink_checks_target_mode
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:896
Method
test_config_file_symlink_outside_config_dir_rejected
( self, tmp_path: pathlib.Path, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_credentials.py:918
Method
test_config_param_builds_in_memory_federation
`Anthropic(config={...})` accepts a config-file-shaped dict and wires it through to a federation provider, including `workspace_id` as
tests/lib/test_credentials.py:2870
Function
test_configs_are_gated_on_the_copy_that_is_sent
()
tests/lib/tools/toolsets/test_interface.py:157
Function
test_configs_is_a_read_only_copy_of_what_to_dict_sends
()
tests/lib/tools/toolsets/test_interface.py:304
Function
test_configs_is_a_read_only_copy_of_what_to_dict_sends
()
tests/lib/tools/toolsets/test_computer_interface.py:218
Function
test_confirm_context_describes_the_target_tab_as_of_the_last_block_and_costs_nothing_unread
()
tests/lib/tools/toolsets/test_confirm.py:99
Function
test_confirm_refusals
()
tests/lib/tools/toolsets/test_refusals.py:114
Function
test_confirm_sees_every_call_and_a_decline_never_reaches_the_driver
()
tests/lib/tools/toolsets/test_confirm.py:44
Function
test_confirm_sees_every_call_with_the_member_and_its_parsed_input
()
tests/lib/tools/toolsets/test_computer_pipeline.py:327
Function
test_confirmation_for_unknown_id_is_ignored
A confirmation for a call this runner has never seen (another client's call, or an `agent.mcp_tool_use` it never dispatches) is recorded but m
tests/lib/tools/test_session_runner.py:963
Function
test_confirmation_in_history_releases_ask_call
An ask-gated call whose `allow` confirmation is already in history (e.g. it was posted while the runner was disconnected) executes on the reco
tests/lib/tools/test_session_runner.py:747
Method
test_construction_accepts_async_middleware
(self)
tests/test_middleware.py:1883
Method
test_construction_accepts_sync_middleware
(self)
tests/test_middleware.py:1346
Method
test_construction_rejects_async_function
(self)
tests/test_middleware.py:1339
Method
test_construction_rejects_async_only_middleware
(self)
tests/test_middleware.py:1335
Method
test_construction_rejects_sync_function
(self)
tests/test_middleware.py:1876
Method
test_construction_rejects_sync_only_middleware
(self)
tests/test_middleware.py:1872
Function
test_content_fetches_fan_out_within_a_store
The first memory's fetch completes only after the second's starts — only parallel fetches satisfy that; serial ones would time out.
tests/lib/tools/memory_sync/test_two_pass.py:78
Method
test_context_management_propagated
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:614
Method
test_context_management_propagated
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:869
Method
test_context_manager
(self, respx_mock: MockRouter)
tests/lib/streaming/test_messages.py:249
Method
test_context_manager
(self, respx_mock: MockRouter)
tests/lib/streaming/test_messages.py:471
Method
test_context_manager
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:481
Method
test_context_manager
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:665
Function
test_context_manager_closes_the_toolset
()
tests/lib/tools/toolsets/test_runnable.py:191
Function
test_control_plane_stop_still_force_stops
A heartbeat reporting `state == "stopped"` ends the run and the item is still force-stopped on the way out — only a *lost* lease skips that.
tests/lib/environments/test_worker.py:522
Function
test_coordinate_lists_must_have_the_shape_the_model_was_told
()
tests/lib/tools/toolsets/test_computer_pipeline.py:173
Method
test_copied_client_does_not_close_http
(self)
tests/test_client.py:1086
Method
test_copied_client_does_not_close_http
(self)
tests/test_client.py:2397
Method
test_copies_top_level_dict
(self)
tests/test_files.py:116
Method
test_copy
(self, client: Anthropic)
tests/test_client.py:153
Method
test_copy
(self, async_client: AsyncAnthropic)
tests/test_client.py:1446
Method
test_copy
(self)
tests/lib/test_vertex.py:103
Method
test_copy
(self)
tests/lib/test_vertex.py:297
Method
test_copy
Test copy() carries over the client configuration.
tests/lib/test_azure.py:69
Method
test_copy
Test copy() carries over the client configuration.
tests/lib/test_azure.py:155
Function
test_copy_accepts_credentials_none_noop
()
tests/lib/test_aws.py:716
Function
test_copy_accepts_credentials_none_noop_async
()
tests/lib/test_aws.py:731
Method
test_copy_build_request
(self, client: Anthropic)
tests/test_client.py:267
Method
test_copy_build_request
(self, async_client: AsyncAnthropic)
tests/test_client.py:1560
Method
test_copy_deep_copies_body
(self)
tests/test_middleware.py:439
Method
test_copy_default_headers
(self)
tests/test_client.py:177
Method
test_copy_default_headers
(self)
tests/test_client.py:1470
Method
test_copy_default_headers
(self)
tests/lib/test_vertex.py:136
Method
test_copy_default_headers
(self)
tests/lib/test_vertex.py:330
Method
test_copy_default_options
(self, client: Anthropic)
tests/test_client.py:161
Method
test_copy_default_options
(self, async_client: AsyncAnthropic)
tests/test_client.py:1454
Method
test_copy_default_options
(self)
tests/lib/test_vertex.py:120
Method
test_copy_default_options
(self)
tests/lib/test_vertex.py:314
Method
test_copy_default_query
(self)
tests/test_client.py:212
Method
test_copy_default_query
(self)
tests/test_client.py:1505
Method
test_copy_does_not_deep_copy_file_objects
(self, tmp_path: Path)
tests/test_middleware.py:451
Method
test_copy_header_mutations_do_not_affect_original
(self)
tests/test_middleware.py:478
Method
test_copy_inherits_replaces_and_clears_middleware
(self)
tests/test_middleware.py:1231
Method
test_copy_inherits_replaces_and_clears_middleware
(self)
tests/test_middleware.py:1824
Method
test_copy_keeps_user_supplied_base_url
(self)
tests/lib/test_google_cloud.py:715
Method
test_copy_location_rederives_base_url
(self)
tests/lib/test_google_cloud.py:707
Method
test_copy_lower_tier_credential_takes_effect
(self, respx_mock: MockRouter)
tests/lib/test_google_cloud.py:730
Function
test_copy_of_deferred_client_still_backfills_and_shares_adc
( respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_google_cloud.py:634
Method
test_copy_of_federation_profile_client_exchanges_per_client
Profile-backed federation: the copy exchanges at its own host and stays out of the profile's on-disk token cache, which belongs to the
tests/lib/test_credentials.py:2810
Method
test_copy_of_user_oauth_profile_client_keeps_refresh_endpoint
A user_oauth profile's refresh token belongs to the deployment that issued it: a copy pointed at another host still refreshes at the p
tests/lib/test_credentials.py:2843
Function
test_copy_overrides_aws_options
()
tests/lib/test_aws.py:606
Method
test_copy_overrides_region
(self)
tests/lib/test_bedrock_mantle.py:292
Method
test_copy_plain_roundtrip_keeps_derived_base_url
(self)
tests/lib/test_google_cloud.py:722
Function
test_copy_preserves_aws_options
()
tests/lib/test_aws.py:588
Method
test_copy_preserves_config
(self)
tests/lib/test_bedrock_mantle.py:283
Method
test_copy_preserves_header_removal
(self, client: Anthropic)
tests/test_client.py:808
Method
test_copy_preserves_header_removal
(self, async_client: AsyncAnthropic)
tests/test_client.py:2109
Method
test_copy_project_rederives_base_url
(self)
tests/lib/test_google_cloud.py:700
Method
test_copy_propagates_credentials
(self)
tests/lib/test_credentials.py:2732
Function
test_copy_region_change_explicit_base_url_wins
( client_cls: _AWSClientClass, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_aws.py:664
Function
test_copy_region_change_keeps_base_url_assigned_after_construction
( client_cls: _AWSClientClass, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_aws.py:705
Function
test_copy_region_change_keeps_custom_base_url
(client_cls: _AWSClientClass, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:679
Function
test_copy_region_change_keeps_env_base_url
(client_cls: _AWSClientClass, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:695
Function
test_copy_region_change_rederives_base_url
(client_cls: _AWSClientClass, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:622
Function
test_copy_region_change_rederives_base_url_api_key_mode
( client_cls: _AWSClientClass, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_aws.py:640
Function
test_copy_region_change_rederives_base_url_skip_auth
( client_cls: _AWSClientClass, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_aws.py:650
Method
test_copy_rejects_first_party_kwargs
(self)
tests/lib/test_google_cloud.py:792
Function
test_copy_rejects_real_credentials_provider
()
tests/lib/test_aws.py:744
Function
test_copy_rejects_real_credentials_provider_async
()
tests/lib/test_aws.py:755
Method
test_copy_returns_new_instance_with_changes
(self)
tests/test_middleware.py:407
Method
test_copy_signature
(self, client: Anthropic)
tests/test_client.py:250
Method
test_copy_signature
(self, async_client: AsyncAnthropic)
tests/test_client.py:1543
Method
test_copy_skip_auth_clears_workspace_and_credentials
(self, respx_mock: MockRouter)
tests/lib/test_google_cloud.py:767
Method
test_copy_token_provider_replaces_credentials
(self, respx_mock: MockRouter)
tests/lib/test_google_cloud.py:750
Method
test_copy_with_different_base_url_exchanges_per_client
`copy(base_url=...)` must not move the parent's token exchange: each client exchanges its assertion at its own host and only ever pres
tests/lib/test_credentials.py:2757
Method
test_copy_with_explicit_api_key_shadows_inherited_credentials
Reviewer ask: copy() should warn when a new explicit `api_key=` shadows an inherited `credentials=` provider from the parent.
tests/lib/test_credentials.py:4194
Method
test_copy_with_same_base_url_shares_token_exchange
A copy targeting the same deployment (here spelled without the trailing slash the client normalises to) keeps sharing the parent's pro
tests/lib/test_credentials.py:2793
Method
test_copy_workspace_required_when_cleared_without_skip_auth
(self)
tests/lib/test_google_cloud.py:785
Function
test_copy_x_stainless_helper_header_appends
()
tests/lib/test_bedrock.py:497
Method
test_copy_x_stainless_helper_header_appends
(self, client: Anthropic)
tests/test_client.py:798
Method
test_copy_x_stainless_helper_header_appends
(self, async_client: AsyncAnthropic)
tests/test_client.py:2099
Method
test_copy_x_stainless_helper_header_appends
(self)
tests/lib/test_vertex.py:174
Method
test_copy_x_stainless_helper_header_appends
(self)
tests/lib/test_vertex.py:368
Method
test_copy_x_stainless_helper_header_appends
x-stainless-helper accumulates across copies instead of being clobbered.
tests/lib/test_azure.py:104
← previous
next →
4,401–4,500 of 9,455, ranked by callers