Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anthropics/anthropic-sdk-python
/ functions
Functions
13,873 in github.com/anthropics/anthropic-sdk-python
⨍
Functions
13,873
◇
Types & classes
4,472
↳
Endpoints
93
Function
test_call_from_inside_a_member_is_a_contract_error_not_a_deadlock
()
tests/lib/tools/toolsets/test_pipeline.py:1043
Function
test_call_made_between_the_last_reads_before_an_idle_stop_runs
()
tests/lib/tools/test_session_runner.py:1876
Method
test_call_next_returns_api_response
(self, respx_mock: MockRouter)
tests/test_middleware.py:1006
Method
test_call_next_returns_api_response
(self, respx_mock: MockRouter)
tests/test_middleware.py:1529
Function
test_call_over_the_limit_waits_for_a_running_call
(limit: int | None, started_at: list[tuple[float, str]])
tests/lib/tools/test_session_runner.py:213
Function
test_call_raises_a_tool_errors_blocks_as_they_are_and_tool_result_keeps_only_the_text
()
tests/lib/tools/toolsets/test_computer_pipeline.py:255
Function
test_call_raises_a_tool_errors_blocks_as_they_are_on_the_async_class
()
tests/lib/tools/toolsets/test_computer_pipeline.py:267
Function
test_call_resolved_before_it_starts_is_neither_run_nor_yielded
(steps: list[Step])
tests/lib/tools/test_session_runner.py:575
Method
test_call_runs_in_a_span_of_its_kind
(self, spans: Spans, custom: bool, span_name: str)
tests/lib/tools/test_open_telemetry.py:2158
Function
test_call_runs_once_an_idle_leaves_out_the_earlier_call
(before: list[Step], idle: str)
tests/lib/tools/test_session_runner.py:964
Function
test_call_runs_when_a_late_idle_that_omits_it_is_read_with_the_idle_that_lists_it
()
tests/lib/tools/test_session_runner.py:624
Method
test_call_span_is_open_but_not_current_while_the_application_reads_a_stream
( self, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:2600
Method
test_call_structured_content_fallback
(self)
tests/lib/tools/test_mcp_tool.py:371
Method
test_call_success
(self)
tests/lib/tools/test_mcp_tool.py:334
Function
test_call_that_finishes_during_a_history_read_is_not_followed_by_a_call_from_its_first_pages
()
tests/lib/tools/test_session_runner.py:1447
Function
test_call_that_needs_no_result_from_a_client_is_neither_run_nor_yielded
(call: Call, at: float)
tests/lib/tools/test_session_runner.py:522
Function
test_call_that_ran_is_yielded_with_its_event_and_the_posted_result
(call: Call)
tests/lib/tools/test_session_runner.py:161
Function
test_call_that_reaches_the_stream_during_the_last_reads_does_not_delay_the_idle_stop
()
tests/lib/tools/test_session_runner.py:1884
Function
test_call_that_the_session_no_longer_waits_on_is_neither_run_nor_yielded
( calls: tuple[Call, ...], then: list[Step], at: float )
tests/lib/tools/test_session_runner.py:551
Function
test_call_that_the_session_waits_on_runs_and_its_result_is_posted
( call: Call, result: dict[str, Any], at: float )
tests/lib/tools/test_session_runner.py:149
Function
test_call_that_the_stream_lost_runs_after_the_next_reconnect
()
tests/lib/tools/test_session_runner.py:1563
Function
test_call_waits_for_a_sign_that_the_server_answered_an_earlier_call
(steps: list[Step], started_at: float)
tests/lib/tools/test_session_runner.py:915
Function
test_call_waits_for_an_earlier_call_that_waits_for_an_idle_to_list_it
()
tests/lib/tools/test_session_runner.py:970
Function
test_call_waits_for_the_answer_to_an_earlier_call_of_its_thread
( earlier: Call, answer: Step, started_at: list[tuple[float, str]], thread: str, at: float )
tests/lib/tools/test_session_runner.py:848
Function
test_call_whose_post_failed_for_the_whole_retry_window_is_yielded_as_not_posted
()
tests/lib/tools/test_session_runner.py:1292
Function
test_call_with_a_permission_or_a_thread_runs_before_any_idle_lists_it
(call: Call, custom_permissions: bool)
tests/lib/tools/test_session_runner.py:465
Function
test_call_with_nothing_to_run_is_yielded_when_the_event_that_resolves_it_is_read_with_it
()
tests/lib/tools/test_session_runner.py:1620
Function
test_call_with_nothing_to_run_is_yielded_with_no_result_and_nothing_is_posted
( steps: list[Step], confirmation: str | None )
tests/lib/tools/test_session_runner.py:771
Method
test_called_again_after_expiry
(self)
tests/lib/test_credentials.py:3973
Method
test_caller_anthropic_beta_header_gains_the_threads_beta_once
( self, respx_mock: MockRouter, header: str )
tests/lib/threads/test_beta_threads.py:198
Method
test_caller_anthropic_beta_header_is_left_alone_once_unthreaded
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:210
Method
test_caller_api_key_header_wins_case_insensitively
(self)
tests/lib/test_azure.py:310
Method
test_caller_authorization_header_wins_case_insensitively
(self)
tests/lib/test_azure.py:300
Method
test_caller_tag_is_appended_not_clobbered
(self, client: Anthropic, respx_mock: respx.MockRouter)
tests/lib/test_stainless_helpers.py:67
Method
test_caller_tag_is_appended_not_clobbered
( self, async_client: AsyncAnthropic, respx_mock: respx.MockRouter )
tests/lib/test_stainless_helpers.py:164
Function
test_calls_of_different_threads_run_concurrently_and_in_order_inside_a_thread
(limit: int | None)
tests/lib/tools/test_session_runner.py:201
Function
test_calls_run_one_at_a_time
()
tests/lib/tools/toolsets/test_pipeline.py:1014
Function
test_calls_run_one_at_a_time_oldest_first
()
tests/lib/tools/test_session_runner.py:172
Function
test_calls_that_an_idle_lists_before_they_arrive_run_in_the_order_of_their_events
()
tests/lib/tools/test_session_runner.py:1611
Function
test_calls_with_nothing_to_run_are_yielded_at_once_while_a_tool_runs
()
tests/lib/tools/test_session_runner.py:823
Function
test_calls_with_nothing_to_run_are_yielded_behind_an_unanswered_call
()
tests/lib/tools/test_session_runner.py:976
Function
test_cancel_during_context_manager_enter_does_not_break_later_calls
()
tests/lib/tools/test_session_runner.py:2000
Method
test_canceling_a_tool_run_leaves_its_span_and_the_tool_runner_span_unset
( self, spans: Spans, respx_mock: MockRouter )
tests/lib/tools/test_open_telemetry.py:1441
Function
test_cancelled_consumer_does_not_cut_a_post_short
()
tests/lib/tools/test_session_runner.py:1919
Function
test_cancelled_consumer_waits_30_seconds_for_a_failing_post
( steps: list[Step], caplog: pytest.LogCaptureFixture )
tests/lib/tools/test_session_runner.py:1307
Function
test_cancelled_download_leaves_nothing_in_the_skills_directory
( tmp_path: Path, async_client: AsyncAnthropic, respx_mock: MockRouter )
tests/lib/tools/test_skills.py:599
Method
test_cancelled_leader_releases_waiters
(self)
tests/lib/test_credentials.py:4225
Function
test_cancelled_sync_tool_is_awaited_until_it_returns
(ending: str, backend: str)
tests/lib/tools/test_session_runner.py:1151
Function
test_cancelled_tool_posts_what_it_returns_or_else_that_it_was_stopped
( fn: Callable[[Any], Awaitable[Any]], posted: tuple[object, bool] )
tests/lib/tools/test_session_runner.py:646
Method
test_chain_and_class_agree_on_profile
default_credentials() and CredentialsFile() resolve to the same profile.
tests/lib/test_credentials.py:1091
Function
test_change_after_a_stopped_call_is_sent
(notes: Path, steps: list[Step], files: dict[str, str])
tests/lib/tools/memory_sync/test_e2e_memory.py:295
Function
test_changes_drained_by_a_failed_call_ride_the_next_block_on_the_async_class
()
tests/lib/tools/toolsets/test_pipeline.py:1282
Function
test_changes_drained_by_a_failed_call_ride_the_next_block_that_reaches_the_model
()
tests/lib/tools/toolsets/test_pipeline.py:617
Method
test_changing_system_or_tools_is_refused_and_a_thread_from_the_params_takes_the_change
( self, respx_mock: MockRouter, change: dict[str, Any] )
tests/lib/threads/test_beta_threads.py:2029
Function
test_chunk_bytes_to_sse_drops_chunk_without_type_or_completion
()
tests/lib/test_bedrock.py:575
Function
test_chunk_bytes_to_sse_legacy_completion
()
tests/lib/test_bedrock.py:558
Function
test_chunk_bytes_to_sse_legacy_completion_with_metrics
()
tests/lib/test_bedrock.py:565
Function
test_chunk_bytes_to_sse_typed_event
()
tests/lib/test_bedrock.py:546
Function
test_circular_reference
(send: Send)
tests/test_prepare.py:754
Method
test_citation_snapshot_excludes_later_citations
(self, respx_mock: MockRouter)
tests/lib/streaming/test_messages.py:381
Method
test_citation_snapshot_excludes_later_citations
(self, respx_mock: MockRouter)
tests/lib/streaming/test_messages.py:701
Method
test_citation_snapshot_excludes_later_citations
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:539
Method
test_citation_snapshot_excludes_later_citations
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:888
Function
test_claim_is_tried_for_300_seconds_and_the_item_is_not_stopped
()
tests/lib/environments/test_worker.py:208
Function
test_clears_inherited_credentials_provider
When the parent client carries a credentials provider (e.g. workload identity), the sub-client must use the explicit bearer token as the unamb
tests/lib/test_scoped_client.py:36
Function
test_clears_parent_api_key_on_copy
If this ever starts returning a sub-client with `api_key` set, the parent's API credential would silently authenticate every helper request, b
tests/lib/test_scoped_client.py:27
Method
test_client_context_manager
(self)
tests/test_client.py:1260
Method
test_client_context_manager
(self)
tests/test_client.py:2726
Method
test_client_default_header_is_sent_in_body_unless_the_request_names_one
( self, user_profile_id: str | Omit, sent: str, client: AnthropicBedrockMantle, respx_mock: MockRouter
tests/lib/test_bedrock_mantle.py:770
Function
test_client_errors_are_fatal_unless_they_are_temporary
(status: int | str, fatal: bool)
tests/lib/tools/test_fake_sessions_api.py:312
Function
test_client_identity_headers_are_kept
(respx_mock: MockRouter)
tests/lib/test_google_cloud.py:678
Function
test_client_identity_headers_are_kept_async
(respx_mock: MockRouter)
tests/lib/test_google_cloud.py:707
Function
test_client_keeps_its_own_retries
(sync: bool)
tests/lib/environments/test_poller.py:278
Method
test_client_max_retries_validation
(self)
tests/test_client.py:1280
Method
test_client_max_retries_validation
(self)
tests/test_client.py:2746
Method
test_client_option
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:4362
Method
test_client_response_validation_error
(self, respx_mock: MockRouter, client: Anthropic)
tests/test_client.py:1269
Method
test_client_response_validation_error
(self, respx_mock: MockRouter, async_client: AsyncAnthropic)
tests/test_client.py:2735
Method
test_client_timeout_option
(self)
tests/test_client.py:390
Method
test_client_timeout_option
(self)
tests/test_client.py:1837
Method
test_client_user_profile_id_is_kept
(self, respx_mock: MockRouter)
tests/lib/test_vertex.py:253
Method
test_client_user_profile_id_is_kept
(self, respx_mock: MockRouter)
tests/lib/test_vertex.py:774
Function
test_client_with_an_option_reads_no_env
( new_client: NewClient, option: OpenTelemetryClientOption, resolved: ResolvedOpenTelemetryOptions )
tests/test_tracing.py:331
Function
test_client_without_an_option_reads_every_env
(new_client: NewClient)
tests/test_tracing.py:312
Function
test_client_workspace_id_is_kept
(respx_mock: MockRouter)
tests/lib/test_bedrock.py:993
Method
test_client_workspace_id_is_kept
(self, client: AnthropicBedrockMantle, respx_mock: MockRouter)
tests/lib/test_bedrock_mantle.py:879
Function
test_client_workspace_id_is_kept_async
(respx_mock: MockRouter)
tests/lib/test_bedrock.py:1017
Function
test_clock_does_not_advance_while_a_thread_works
()
tests/lib/environments/test_fake_work_api.py:122
Function
test_close_and_with_mark_the_toolset_closed_sync
()
tests/lib/tools/toolsets/test_runner.py:707
Method
test_close_awaits_aclose
(self)
tests/lib/test_credentials.py:4255
Method
test_close_awaits_an_async_close
(self)
tests/lib/test_credentials.py:4268
Function
test_close_from_inside_a_member_does_not_wait_for_itself
()
tests/lib/tools/toolsets/test_pipeline.py:1213
Method
test_close_reaches_a_partial_wrapped_provider
(self)
tests/lib/test_credentials.py:4291
Method
test_close_tolerates_hooks_that_return_nothing_to_await
A `Mock` has every attribute, so on Python < 3.12 it looks like it has `aclose()`.
tests/lib/test_credentials.py:4279
Function
test_close_waits_for_accepted_calls_to_settle
()
tests/lib/tools/toolsets/test_pipeline.py:1176
Function
test_close_waits_for_the_call_in_flight
()
tests/lib/tools/toolsets/test_computer_pipeline.py:490
Method
test_closed_stream_has_no_output
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:5978
Method
test_closing_the_async_runner_ends_the_span_unset
(self, spans: Spans, respx_mock: MockRouter)
tests/lib/tools/test_open_telemetry.py:1146
Method
test_closing_the_async_runner_from_a_tool_that_runs_while_the_reply_streams_stops_the_loop
( self, spans: Spans, respx_mock: MockRouter, reader: str )
tests/lib/tools/test_open_telemetry.py:1697
Method
test_closing_the_async_runner_from_a_toolset_member_that_runs_while_the_reply_streams_stops_the_loop
( self, spans: Spans, respx_mock: MockRouter, reader: str )
tests/lib/tools/test_open_telemetry.py:1797
← previous
next →
6,301–6,400 of 13,873, ranked by callers