Home / Class/ TextBlock Class — anthropic-sdk-python Architecture

TextBlock Class — anthropic-sdk-python Architecture

Architecture documentation for the TextBlock class in text_block.py from the anthropic-sdk-python codebase.

Entity Profile

Dependency Diagram

graph TD
  7af6ce9f_6b89_6438_fd73_c9fc07a7ba28["TextBlock"]
  17ce5647_6f06_0676_a4a5_e378a3f57cb1["BaseModel"]
  7af6ce9f_6b89_6438_fd73_c9fc07a7ba28 -->|extends| 17ce5647_6f06_0676_a4a5_e378a3f57cb1
  7011abba_fb52_65c0_a717_c6c8750f4696["text_block.py"]
  7af6ce9f_6b89_6438_fd73_c9fc07a7ba28 -->|defined in| 7011abba_fb52_65c0_a717_c6c8750f4696

Relationship Graph

Source Code

src/anthropic/types/text_block.py lines 12–23

class TextBlock(BaseModel):
    citations: Optional[List[TextCitation]] = None
    """Citations supporting the text block.

    The type of citation returned will depend on the type of document being cited.
    Citing a PDF results in `page_location`, plain text results in `char_location`,
    and content document results in `content_block_location`.
    """

    text: str

    type: Literal["text"]

Extends

Frequently Asked Questions

What is the TextBlock class?
TextBlock is a class in the anthropic-sdk-python codebase, defined in src/anthropic/types/text_block.py.
Where is TextBlock defined?
TextBlock is defined in src/anthropic/types/text_block.py at line 12.
What does TextBlock extend?
TextBlock extends BaseModel.

Analyze Your Own Codebase

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

Try Supermodel Free