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

__stream_text__() — anthropic-sdk-python Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  8a3c6b8e_06b2_3e7a_5dc7_7f81da63acdf["__stream_text__()"]
  fa27ef0f_31e3_cd5e_ffa3_12becd4b426b["BetaMessageStream"]
  8a3c6b8e_06b2_3e7a_5dc7_7f81da63acdf -->|defined in| fa27ef0f_31e3_cd5e_ffa3_12becd4b426b
  style 8a3c6b8e_06b2_3e7a_5dc7_7f81da63acdf fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/anthropic/lib/streaming/_beta_messages.py lines 144–147

    def __stream_text__(self) -> Iterator[str]:
        for chunk in self:
            if chunk.type == "content_block_delta" and chunk.delta.type == "text_delta":
                yield chunk.delta.text

Subdomains

Frequently Asked Questions

What does __stream_text__() do?
__stream_text__() is a function in the anthropic-sdk-python codebase, defined in src/anthropic/lib/streaming/_beta_messages.py.
Where is __stream_text__() defined?
__stream_text__() is defined in src/anthropic/lib/streaming/_beta_messages.py at line 144.

Analyze Your Own Codebase

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

Try Supermodel Free