transform() — anthropic-sdk-python Function Reference
Architecture documentation for the transform() function in test_transform.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 5eb50e5f_8948_6af4_c03d_f10efd0687eb["transform()"] 6d065906_49ba_5188_2c4a_08d599bd18f8["test_transform.py"] 5eb50e5f_8948_6af4_c03d_f10efd0687eb -->|defined in| 6d065906_49ba_5188_2c4a_08d599bd18f8 492a5e1d_4349_7b6b_86c6_97bb09bb6ee5["test_top_level_alias()"] 492a5e1d_4349_7b6b_86c6_97bb09bb6ee5 -->|calls| 5eb50e5f_8948_6af4_c03d_f10efd0687eb 2bd9579c_3838_bb3e_99ca_8c9f5dd5ee7f["test_recursive_typeddict()"] 2bd9579c_3838_bb3e_99ca_8c9f5dd5ee7f -->|calls| 5eb50e5f_8948_6af4_c03d_f10efd0687eb 5407d614_ad4b_c269_0d14_f30260e70ceb["test_list_of_typeddict()"] 5407d614_ad4b_c269_0d14_f30260e70ceb -->|calls| 5eb50e5f_8948_6af4_c03d_f10efd0687eb 769101a2_e702_e5b5_ecd5_8214184b7fc7["test_union_of_typeddict()"] 769101a2_e702_e5b5_ecd5_8214184b7fc7 -->|calls| 5eb50e5f_8948_6af4_c03d_f10efd0687eb d0dd1d71_2817_0369_0934_ab899dcf7769["test_union_of_list()"] d0dd1d71_2817_0369_0934_ab899dcf7769 -->|calls| 5eb50e5f_8948_6af4_c03d_f10efd0687eb c04faa12_21c8_3607_0afe_d0a3f9545203["test_includes_unknown_keys()"] c04faa12_21c8_3607_0afe_d0a3f9545203 -->|calls| 5eb50e5f_8948_6af4_c03d_f10efd0687eb 97de6137_88f9_bd8b_3b8a_47b9bc12192f["test_ignores_invalid_input()"] 97de6137_88f9_bd8b_3b8a_47b9bc12192f -->|calls| 5eb50e5f_8948_6af4_c03d_f10efd0687eb 5cda57f9_7ce9_1454_0cf9_e85841d14361["test_iso8601_format()"] 5cda57f9_7ce9_1454_0cf9_e85841d14361 -->|calls| 5eb50e5f_8948_6af4_c03d_f10efd0687eb 666857ba_6acb_3cd7_b0c9_ea203a5e2c99["test_optional_iso8601_format()"] 666857ba_6acb_3cd7_b0c9_ea203a5e2c99 -->|calls| 5eb50e5f_8948_6af4_c03d_f10efd0687eb 363e94f8_3f51_8b25_e43f_4b774c5d1718["test_required_iso8601_format()"] 363e94f8_3f51_8b25_e43f_4b774c5d1718 -->|calls| 5eb50e5f_8948_6af4_c03d_f10efd0687eb dc04cd79_ce58_137d_7526_3d3b51a8763b["test_union_datetime()"] dc04cd79_ce58_137d_7526_3d3b51a8763b -->|calls| 5eb50e5f_8948_6af4_c03d_f10efd0687eb 1ab200ca_7b65_ae2a_55e0_b7a6dea4a0b3["test_nested_list_iso6801_format()"] 1ab200ca_7b65_ae2a_55e0_b7a6dea4a0b3 -->|calls| 5eb50e5f_8948_6af4_c03d_f10efd0687eb e9e40434_0a1b_28ed_c9d8_c3f72a5e29d3["test_datetime_custom_format()"] e9e40434_0a1b_28ed_c9d8_c3f72a5e29d3 -->|calls| 5eb50e5f_8948_6af4_c03d_f10efd0687eb style 5eb50e5f_8948_6af4_c03d_f10efd0687eb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_transform.py lines 26–34
async def transform(
data: _T,
expected_type: object,
use_async: bool,
) -> _T:
if use_async:
return await _async_transform(data, expected_type=expected_type)
return _transform(data, expected_type=expected_type)
Domain
Subdomains
Defined In
Called By
- test_base64_file_input()
- test_datetime_custom_format()
- test_datetime_with_alias()
- test_dictionary_items()
- test_ignores_invalid_input()
- test_includes_unknown_keys()
- test_iso8601_format()
- test_iterable_of_dictionaries()
- test_iterable_union_str()
- test_list_of_typeddict()
- test_nested_list_iso6801_format()
- test_optional_iso8601_format()
- test_pydantic_default_field()
- test_pydantic_empty_model()
- test_pydantic_mismatched_object_type()
- test_pydantic_mismatched_types()
- test_pydantic_model_to_dictionary()
- test_pydantic_nested_objects()
- test_pydantic_unknown_field()
- test_recursive_typeddict()
- test_required_iso8601_format()
- test_strips_notgiven()
- test_strips_omit()
- test_top_level_alias()
- test_transform_skipping()
- test_union_datetime()
- test_union_of_list()
- test_union_of_typeddict()
Source
Frequently Asked Questions
What does transform() do?
transform() is a function in the anthropic-sdk-python codebase, defined in tests/test_transform.py.
Where is transform() defined?
transform() is defined in tests/test_transform.py at line 26.
What calls transform()?
transform() is called by 28 function(s): test_base64_file_input, test_datetime_custom_format, test_datetime_with_alias, test_dictionary_items, test_ignores_invalid_input, test_includes_unknown_keys, test_iso8601_format, test_iterable_of_dictionaries, and 20 more.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free