_stream.py — anthropic-sdk-python Source File
Architecture documentation for _stream.py, a python file in the anthropic-sdk-python codebase. 6 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 43a93153_bd96_06f2_9418_72daf6b4ca3a["_stream.py"] cbdd42fd_75f9_7cc6_3f3b_b8d939e4c157["_client.py"] 43a93153_bd96_06f2_9418_72daf6b4ca3a --> cbdd42fd_75f9_7cc6_3f3b_b8d939e4c157 597ca033_023a_d6d2_0dc5_e7dacc60a056["_streaming"] 43a93153_bd96_06f2_9418_72daf6b4ca3a --> 597ca033_023a_d6d2_0dc5_e7dacc60a056 91a12d3e_6b2a_90bd_28df_074cc1d1ad53["_stream_decoder.py"] 43a93153_bd96_06f2_9418_72daf6b4ca3a --> 91a12d3e_6b2a_90bd_28df_074cc1d1ad53 582aef90_700e_ea04_755a_159b23a192d2["AWSEventStreamDecoder"] 43a93153_bd96_06f2_9418_72daf6b4ca3a --> 582aef90_700e_ea04_755a_159b23a192d2 89ddcdd7_3ae1_4c7b_41bb_9f1e25f16875["typing"] 43a93153_bd96_06f2_9418_72daf6b4ca3a --> 89ddcdd7_3ae1_4c7b_41bb_9f1e25f16875 9c26e8a9_1ad2_1174_876a_1fc500ce0eaf["httpx"] 43a93153_bd96_06f2_9418_72daf6b4ca3a --> 9c26e8a9_1ad2_1174_876a_1fc500ce0eaf style 43a93153_bd96_06f2_9418_72daf6b4ca3a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
from __future__ import annotations
from typing import TypeVar
import httpx
from ..._client import Anthropic, AsyncAnthropic
from ..._streaming import Stream, AsyncStream
from ._stream_decoder import AWSEventStreamDecoder
_T = TypeVar("_T")
class BedrockStream(Stream[_T]):
def __init__(
self,
*,
cast_to: type[_T],
response: httpx.Response,
client: Anthropic,
) -> None:
super().__init__(cast_to=cast_to, response=response, client=client)
self._decoder = AWSEventStreamDecoder()
class AsyncBedrockStream(AsyncStream[_T]):
def __init__(
self,
*,
cast_to: type[_T],
response: httpx.Response,
client: AsyncAnthropic,
) -> None:
super().__init__(cast_to=cast_to, response=response, client=client)
self._decoder = AWSEventStreamDecoder()
Domain
Subdomains
Classes
Dependencies
- AWSEventStreamDecoder
- _client.py
- _stream_decoder.py
- _streaming
- httpx
- typing
Source
Frequently Asked Questions
What does _stream.py do?
_stream.py is a source file in the anthropic-sdk-python codebase, written in python. It belongs to the AnthropicClient domain, AsyncAPI subdomain.
What does _stream.py depend on?
_stream.py imports 6 module(s): AWSEventStreamDecoder, _client.py, _stream_decoder.py, _streaming, httpx, typing.
Where is _stream.py in the architecture?
_stream.py is located at src/anthropic/lib/bedrock/_stream.py (domain: AnthropicClient, subdomain: AsyncAPI, directory: src/anthropic/lib/bedrock).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free