TextEvent Class — anthropic-sdk-python Architecture
Architecture documentation for the TextEvent class in _types.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 25f5e18c_763b_8f7d_5a87_8b7bc536af01["TextEvent"] 17ce5647_6f06_0676_a4a5_e378a3f57cb1["BaseModel"] 25f5e18c_763b_8f7d_5a87_8b7bc536af01 -->|extends| 17ce5647_6f06_0676_a4a5_e378a3f57cb1 0fe13bcd_521d_1fdd_3edc_21cd47da8ca0["_types.py"] 25f5e18c_763b_8f7d_5a87_8b7bc536af01 -->|defined in| 0fe13bcd_521d_1fdd_3edc_21cd47da8ca0 1c5f8db5_286a_9f98_3bb2_74b15a3fc493["parsed_snapshot()"] 25f5e18c_763b_8f7d_5a87_8b7bc536af01 -->|method| 1c5f8db5_286a_9f98_3bb2_74b15a3fc493
Relationship Graph
Source Code
src/anthropic/lib/streaming/_types.py lines 23–33
class TextEvent(BaseModel):
type: Literal["text"]
text: str
"""The text delta"""
snapshot: str
"""The entire accumulated text"""
def parsed_snapshot(self) -> Dict[str, Any]:
return cast(Dict[str, Any], jiter.from_json(self.snapshot.encode("utf-8"), partial_mode="trailing-strings"))
Domain
Defined In
Extends
Source
Frequently Asked Questions
What is the TextEvent class?
TextEvent is a class in the anthropic-sdk-python codebase, defined in src/anthropic/lib/streaming/_types.py.
Where is TextEvent defined?
TextEvent is defined in src/anthropic/lib/streaming/_types.py at line 23.
What does TextEvent extend?
TextEvent extends BaseModel.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free