SyncAPI — anthropic-sdk-python Architecture
Provides a blocking interface for standard procedural Python execution
Entity Profile
Dependency Diagram
graph TD subdomain_AnthropicClient_SyncAPI["SyncAPI"] 7bcf2a66_49f2_0382_7180_1ee6501f1674["_client.py"] subdomain_AnthropicClient_SyncAPI --> 7bcf2a66_49f2_0382_7180_1ee6501f1674 c96ee5ad_7068_af50_518d_eabdd7af5c4e["_compat.py"] subdomain_AnthropicClient_SyncAPI --> c96ee5ad_7068_af50_518d_eabdd7af5c4e cbdd42fd_75f9_7cc6_3f3b_b8d939e4c157["_client.py"] subdomain_AnthropicClient_SyncAPI --> cbdd42fd_75f9_7cc6_3f3b_b8d939e4c157 9ee341c1_cb2e_bfd0_6bd3_0e4d237fbb62["_logs.py"] subdomain_AnthropicClient_SyncAPI --> 9ee341c1_cb2e_bfd0_6bd3_0e4d237fbb62 3965d879_b0ae_9368_c20d_7ddc509b318b["ruffen-docs.py"] subdomain_AnthropicClient_SyncAPI --> 3965d879_b0ae_9368_c20d_7ddc509b318b fd640620_de49_331e_578e_1d363467c440["utils.py"] subdomain_AnthropicClient_SyncAPI --> fd640620_de49_331e_578e_1d363467c440 42bbcd31_8f6d_2f63_8151_c7757c0f606e["thinking_stream.py"] subdomain_AnthropicClient_SyncAPI --> 42bbcd31_8f6d_2f63_8151_c7757c0f606e 05a7b67e_1fde_5c25_9b37_cc7e827cb62e["__init__.py"] subdomain_AnthropicClient_SyncAPI --> 05a7b67e_1fde_5c25_9b37_cc7e827cb62e 738dc346_a11e_4dc7_f7df_dced9f1a2476["_qs.py"] subdomain_AnthropicClient_SyncAPI --> 738dc346_a11e_4dc7_f7df_dced9f1a2476 871e7374_d14c_c620_e6da_d4dfceb15d13["bedrock.py"] subdomain_AnthropicClient_SyncAPI --> 871e7374_d14c_c620_e6da_d4dfceb15d13 d84478fe_6b5f_cefd_a948_48255cf7924b["test_response.py"] subdomain_AnthropicClient_SyncAPI --> d84478fe_6b5f_cefd_a948_48255cf7924b fb1a4163_0002_aa33_791c_d193be58f7a1["tools_runner_search_tool.py"] subdomain_AnthropicClient_SyncAPI --> fb1a4163_0002_aa33_791c_d193be58f7a1 add5a69b_d84f_deef_9958_765008080340["_json.py"] subdomain_AnthropicClient_SyncAPI --> add5a69b_d84f_deef_9958_765008080340 9f659f2e_724c_fa6e_9bf2_51745746d7f3["auto_compaction.py"] subdomain_AnthropicClient_SyncAPI --> 9f659f2e_724c_fa6e_9bf2_51745746d7f3 style subdomain_AnthropicClient_SyncAPI fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Domain
Functions
- Base64FileInput()
- GenericModel()
- NoneType()
- RootModel()
- RuntimeError()
- SystemExit()
- __aenter__()
- __aexit__()
- __aexit__()
- __aiter__()
- __aiter__()
- __anext__()
- __as_proxied__()
- __await__()
- __bool__()
- __class__()
- __del__()
- __enter__()
- __enter__()
- __exit__()
- __exit__()
- __getattr__()
- __getitem__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __init__()
- __instancecheck__()
- __iter__()
- __iter__()
- __len__()
- __name()
- __repr__()
- __repr__()
- __repr__()
- __reversed__()
- __set__()
- __str__()
- __str__()
- __str__()
- __stream__()
- _aiter_chunks()
- _basic_config()
- _build_headers()
- _calculate_nonstreaming_timeout()
- _calculate_retry_timeout()
- _client()
- _collect_files()
- _enforce_trailing_slash()
- _extract_field_schema_pv2()
- _from_unix_seconds()
- _get_annotated_type()
- _get_extra_fields_type()
- _get_page()
- _get_page_items()
- _get_page_items()
- _get_page_items()
- _get_page_items()
- _info_to_options()
- _iter_chunks()
- _iter_events()
- _make_sse_decoder()
- _make_sse_decoder()
- _make_sse_decoder()
- _make_status_error()
- _make_status_error()
- _make_status_error_from_response()
- _make_sync_iterator()
- _maybe_override_cast_to()
- _merge_mappings()
- _models()
- _models()
- _params_from_url()
- _parse()
- _parse_message_from_event()
- _parse_retry_after_header()
- _prepare_options()
- _prepare_options()
- _prepare_options()
- _prepare_options()
- _prepare_url()
- _process_response()
- _process_response()
- _process_response_data()
- _serialize_multipartform()
- _set_private_attributes()
- _set_private_attributes()
- _should_retry()
- _should_stream_response_body()
- _sleep()
- _sleep()
- _sleep_for_retry()
- _sleep_for_retry()
- _stringify_item()
- _strip_raw_response_header()
- _transform_file()
- _transform_recursive()
- _transform_typeddict()
- _utils()
- _validate_headers()
- _warn_output_format_deprecated()
- aiter_bytes()
- aiter_lines()
- assert_basic_response()
- assert_empty_iter()
- assert_matches_type()
- assert_signatures_in_sync()
- assert_tool_use_response()
- astream_to_file()
- asyncify()
- asyncio()
- base_url()
- batch_id()
- batches()
- batches()
- batches()
- batches()
- batches()
- batches()
- batches()
- beta()
- beta()
- beta()
- beta()
- block()
- build()
- cached_property()
- cancel()
- client()
- close()
- close()
- close()
- close()
- coerce_boolean()
- coerce_integer()
- completions()
- completions()
- construct()
- construct_type_unchecked()
- consume_sync_iterator()
- content()
- content_block()
- copy()
- copy()
- copy()
- copy()
- copy()
- copy()
- copy()
- create()
- create()
- create_tz()
- curr_msg_count()
- deepcopy_minimal()
- default_headers()
- default_headers()
- default_headers()
- default_query()
- delete()
- delete()
- delete()
- done()
- download()
- elapsed()
- encoding()
- event()
- event()
- extract_files()
- extract_type_var_from_base()
- field_get_default()
- file_from_path()
- files()
- files()
- find_breaking_changes()
- format_code_block()
- format_file()
- format_str()
- function_has_argument()
- get()
- get()
- get_args()
- get_model_config()
- get_next_page()
- get_next_page()
- get_python_runtime()
- get_python_version()
- get_response()
- get_response_stream_shape()
- get_transformed_string()
- get_weather()
- get_weather()
- google()
- has_next_page()
- has_next_page()
- has_next_page()
- has_next_page()
- is_annotated_type()
- is_basemodel_type()
- is_closed()
- is_closed()
- is_file_content()
- is_given()
- is_list()
- is_literal_type()
- is_mapping_t()
- is_sequence_t()
- is_sequence_type()
- is_stream_class_type()
- is_tuple_t()
- is_typevar()
- is_union()
- is_union_type()
- iter_bytes()
- iter_bytes()
- iter_bytes()
- iter_bytes()
- iter_bytes()
- iter_lines()
- iter_lines()
- iter_lines()
- iter_pages()
- iter_pages()
- json()
- json()
- json()
- json()
- list()
- list()
- list()
- list()
- list()
- lru_cache()
- main()
- main()
- main()
- main()
- main()
- main()
- main()
- main()
- make_event_iterator()
- make_tool_searcher()
- maybe_coerce_float()
- maybe_transform()
- messages()
- messages()
- messages()
- messages()
- messages()
- messages()
- messages()
- messages()
- messages()
- messages()
- messages()
- messages()
- method()
- method()
- model_copy()
- model_id()
- model_parse()
- model_parse_json()
- models()
- models()
- models()
- models()
- next_page_info()
- next_page_info()
- next_page_info()
- next_page_info()
- openapi_dumps()
- parse()
- parse()
- parse()
- parse_beta_response()
- parse_date()
- parse_datetime()
- parse_datetime()
- parse_obj()
- parsed_output()
- platform_headers()
- platform_headers()
- post()
- post()
- print()
- print_obj()
- profile_to_ini()
- project_id()
- public_members()
- put()
- put()
- pydantic_core()
- qs()
- quote()
- read()
- read()
- removeprefix()
- results()
- retrieve()
- retrieve()
- retrieve()
- retry()
- rich()
- rich_print_str()
- search()
- set_pydantic_config()
- skills()
- skills()
- skills()
- status_code()
- status_code()
- stream()
- stream_error()
- stream_to_file()
- stringify()
- strip_annotated_type()
- sync_client()
- sync_stream()
- test_array_repeat()
- test_base_url_env()
- test_base_url_no_trailing_slash()
- test_base_url_setter()
- test_basic()
- test_basic_call_sync()
- test_basic_response()
- test_basic_response()
- test_basic_union_response()
- test_binary_content_upload()
- test_binary_content_upload_with_body_is_deprecated()
- test_client_context_manager()
- test_client_max_retries_validation()
- test_compaction_control()
- test_compat_method_no_error_for_warnings()
- test_context_manager()
- test_copy()
- test_copy_default_options()
- test_copy_default_options()
- test_copy_default_query()
- test_copy_signature()
- test_custom_input_schema_with_dict()
- test_custom_message_handling()
- test_datetime_with_alias()
- test_decorator_without_parentheses()
- test_default_headers_option()
- test_default_stream_cls()
- test_dictionary_items()
- test_directly_nested_model()
- test_discriminated_unions_overlapping_discriminators_invalid_data()
- test_discriminated_unions_unknown_variant()
- test_docstring_parsing_simple()
- test_does_not_coerce_int()
- test_double_nested_union()
- test_event_missing_data()
- test_extra_properties()
- test_extract_response_type_binary_response()
- test_extract_response_type_direct_classes()
- test_extract_type_var()
- test_extract_type_var_generic_subclass_multiple()
- test_field_named_cls()
- test_follow_redirects_disabled()
- test_follow_redirects_disabled()
- test_forwards_compat_model_dump_method()
- test_function_with_multiple_types()
- test_function_without_docstring()
- test_global_region_base_url()
- test_integer_schema_with_min_max_exclusive()
- test_iso8601_format()
- test_list_of_unions()
- test_messages_retries()
- test_messages_retries()
- test_missing_credentials_error()
- test_multi_byte_character_multiple_chunks()
- test_multipart_repeating_array()
- test_multiple_data_lines_with_empty_line()
- test_multiple_files()
- test_multiple_params()
- test_nested_dict()
- test_nested_dotted()
- test_nested_list()
- test_nested_union_of_mixed_types()
- test_non_application_json_content_type_for_json_data()
- test_non_application_json_content_type_for_json_data()
- test_object_schema()
- test_omit_retry_count_header()
- test_optional_list_nested_model()
- test_overwrite_retry_count_header()
- test_parse_uses_output_config()
- test_parse_with_pydantic_model()
- test_partial_json_with_invalid_json()
- test_proxy_environment_variables()
- test_proxy_environment_variables()
- test_pydantic_model_with_default_values()
- test_pydantic_model_with_optional_fields()
- test_pydantic_nested_objects()
- test_pydantic_unknown_field()
- test_raw_dictionary()
- test_raw_response_for_binary()
- test_raw_response_for_binary()
- test_received_text_for_expected_json()
- test_received_text_for_expected_json()
- test_recursive_proxy()
- test_recursive_typeddict()
- test_ref_schema()
- test_region_infer_from_specified_profile()
- test_regional_base_url()
- test_repr_nested_model()
- test_response_parse_annotated_type()
- test_response_parse_bool()
- test_response_parse_custom_model()
- test_response_parse_expect_model_union_non_json_content()
- test_retrying_status_errors_doesnt_leak()
- test_retrying_timeout_errors_doesnt_leak()
- test_special_new_line_character()
- test_stream_method_definition_in_sync()
- test_stream_method_definition_in_sync()
- test_streaming_call_sync()
- test_streaming_call_sync_events()
- test_strict_validation_unknown_fields()
- test_too_many_positional_params()
- test_tool_runner_method_in_sync()
- test_tool_use()
- test_tool_use()
- test_tool_use()
- test_transform_skipping()
- test_tuple_input()
- test_type_compat()
- test_union_datetime()
- test_union_of_list()
- test_unsupported_type_asserts()
- test_validate_headers()
- test_with_options()
- text()
- text()
- thinking()
- to_aiter()
- to_custom_raw_response_wrapper()
- to_custom_streamed_response_wrapper()
- to_json()
- to_raw_response_wrapper()
- to_thread()
- tool_runner()
- upload()
- user_agent()
- validate_output_format()
- versions()
- with_raw_response()
- with_raw_response()
- with_raw_response()
- with_raw_response()
- with_raw_response()
- with_raw_response()
- with_raw_response()
- with_raw_response()
- with_raw_response()
- with_raw_response()
- with_raw_response()
- with_raw_response()
- with_raw_response()
- with_streaming_response()
- with_streaming_response()
- with_streaming_response()
- with_streaming_response()
- with_streaming_response()
- with_streaming_response()
- with_streaming_response()
- with_streaming_response()
- with_streaming_response()
- with_streaming_response()
- with_streaming_response()
- with_streaming_response()
- with_streaming_response()
- write_to_file()
- write_to_file()
Source Files
- src/anthropic/__init__.py
- src/anthropic/lib/vertex/_beta.py
- src/anthropic/lib/bedrock/_beta.py
- src/anthropic/lib/vertex/_beta_messages.py
- src/anthropic/lib/bedrock/_beta_messages.py
- src/anthropic/lib/bedrock/_client.py
- src/anthropic/lib/vertex/_client.py
- src/anthropic/lib/_extras/_common.py
- src/anthropic/_utils/_compat.py
- src/anthropic/_compat.py
- src/anthropic/_exceptions.py
- src/anthropic/_utils/_json.py
- src/anthropic/_legacy_response.py
- src/anthropic/_utils/_logs.py
- src/anthropic/_models.py
- src/anthropic/_utils/_proxy.py
- src/anthropic/_qs.py
- src/anthropic/_utils/_reflection.py
- src/anthropic/_streaming.py
- src/anthropic/_utils/_streams.py
- src/anthropic/_utils/_sync.py
- src/anthropic/lib/_parse/_transform.py
- src/anthropic/_utils/_transform.py
- src/anthropic/_types.py
- src/anthropic/_utils/_typing.py
- examples/auto_compaction.py
- examples/batch_results.py
- examples/bedrock.py
- src/anthropic/resources/completions.py
- scripts/detect-breaking-changes.py
- src/anthropic/resources/messages/messages.py
- examples/messages_stream.py
- src/anthropic/types/parsed_message.py
- scripts/utils/ruffen-docs.py
- examples/structured_outputs_streaming.py
- tests/lib/test_bedrock.py
- tests/test_utils/test_datetime_parse.py
- tests/test_utils/test_json.py
- tests/lib/streaming/test_messages.py
- tests/test_utils/test_proxy.py
- tests/test_required_args.py
- tests/test_response.py
- tests/lib/_parse/test_transform.py
- tests/test_utils/test_typing.py
- examples/text_completions_demo_sync.py
- examples/text_completions_streaming.py
- examples/thinking.py
- examples/thinking_stream.py
- examples/tools_runner.py
- examples/tools_runner_search_tool.py
- examples/tools_stream.py
- tests/lib/utils.py
- examples/vertex.py
- examples/web_search.py
- examples/web_search_stream.py
Source
- src/anthropic/__init__.py
- src/anthropic/lib/vertex/_beta.py
- src/anthropic/lib/bedrock/_beta.py
- src/anthropic/lib/vertex/_beta_messages.py
- src/anthropic/lib/bedrock/_beta_messages.py
- src/anthropic/lib/bedrock/_client.py
- src/anthropic/lib/vertex/_client.py
- src/anthropic/lib/_extras/_common.py
- src/anthropic/_utils/_compat.py
- src/anthropic/_compat.py
- src/anthropic/_exceptions.py
- src/anthropic/_utils/_json.py
- src/anthropic/_legacy_response.py
- src/anthropic/_utils/_logs.py
- src/anthropic/_models.py
- src/anthropic/_utils/_proxy.py
- src/anthropic/_qs.py
- src/anthropic/_utils/_reflection.py
- src/anthropic/_streaming.py
- src/anthropic/_utils/_streams.py
- src/anthropic/_utils/_sync.py
- src/anthropic/lib/_parse/_transform.py
- src/anthropic/_utils/_transform.py
- src/anthropic/_types.py
- src/anthropic/_utils/_typing.py
- examples/auto_compaction.py
- examples/batch_results.py
- examples/bedrock.py
- src/anthropic/resources/completions.py
- scripts/detect-breaking-changes.py
- src/anthropic/resources/messages/messages.py
- examples/messages_stream.py
- src/anthropic/types/parsed_message.py
- scripts/utils/ruffen-docs.py
- examples/structured_outputs_streaming.py
- tests/lib/test_bedrock.py
- tests/test_utils/test_datetime_parse.py
- tests/test_utils/test_json.py
- tests/lib/streaming/test_messages.py
- tests/test_utils/test_proxy.py
- tests/test_required_args.py
- tests/test_response.py
- tests/lib/_parse/test_transform.py
- tests/test_utils/test_typing.py
- examples/text_completions_demo_sync.py
- examples/text_completions_streaming.py
- examples/thinking.py
- examples/thinking_stream.py
- examples/tools_runner.py
- examples/tools_runner_search_tool.py
- examples/tools_stream.py
- tests/lib/utils.py
- examples/vertex.py
- examples/web_search.py
- examples/web_search_stream.py
Frequently Asked Questions
What is the SyncAPI subdomain?
SyncAPI is a subdomain in the anthropic-sdk-python codebase, part of the AnthropicClient domain. Provides a blocking interface for standard procedural Python execution It contains 55 source files.
Which domain does SyncAPI belong to?
SyncAPI belongs to the AnthropicClient domain.
What functions are in SyncAPI?
The SyncAPI subdomain contains 525 function(s): Base64FileInput, GenericModel, NoneType, RootModel, RuntimeError, SystemExit, __aenter__, __aexit__, and 517 more.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free