Home / Function/ is_file_content() — anthropic-sdk-python Function Reference

is_file_content() — anthropic-sdk-python Function Reference

Architecture documentation for the is_file_content() function in _files.py from the anthropic-sdk-python codebase.

Entity Profile

Dependency Diagram

graph TD
  9a63633c_8e74_26f9_c6a1_f20798823de1["is_file_content()"]
  e20f2c32_b105_01cb_557f_c10174db767d["_files.py"]
  9a63633c_8e74_26f9_c6a1_f20798823de1 -->|defined in| e20f2c32_b105_01cb_557f_c10174db767d
  fc3e0627_eb3c_a199_98e4_dff322660661["assert_is_file_content()"]
  fc3e0627_eb3c_a199_98e4_dff322660661 -->|calls| 9a63633c_8e74_26f9_c6a1_f20798823de1
  b8087977_732a_4a4d_c940_30a2bc3ff47f["_transform_file()"]
  b8087977_732a_4a4d_c940_30a2bc3ff47f -->|calls| 9a63633c_8e74_26f9_c6a1_f20798823de1
  1a5c7024_2ce7_08ee_07d4_55e716e1b111["_async_transform_file()"]
  1a5c7024_2ce7_08ee_07d4_55e716e1b111 -->|calls| 9a63633c_8e74_26f9_c6a1_f20798823de1
  style 9a63633c_8e74_26f9_c6a1_f20798823de1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/anthropic/_files.py lines 27–30

def is_file_content(obj: object) -> TypeGuard[FileContent]:
    return (
        isinstance(obj, bytes) or isinstance(obj, tuple) or isinstance(obj, io.IOBase) or isinstance(obj, os.PathLike)
    )

Subdomains

Frequently Asked Questions

What does is_file_content() do?
is_file_content() is a function in the anthropic-sdk-python codebase, defined in src/anthropic/_files.py.
Where is is_file_content() defined?
is_file_content() is defined in src/anthropic/_files.py at line 27.
What calls is_file_content()?
is_file_content() is called by 3 function(s): _async_transform_file, _transform_file, assert_is_file_content.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free