Messages Class — anthropic-sdk-python Architecture
Architecture documentation for the Messages class in _beta_messages.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 80a3c9b9_302c_c9e6_2c40_26bda04d511b["Messages"] 32bd9d9e_8b62_b229_7718_45771b424c40["SyncAPIResource"] 80a3c9b9_302c_c9e6_2c40_26bda04d511b -->|extends| 32bd9d9e_8b62_b229_7718_45771b424c40 9f8cfa61_f82b_899e_e7b0_4af933553480["_beta_messages.py"] 80a3c9b9_302c_c9e6_2c40_26bda04d511b -->|defined in| 9f8cfa61_f82b_899e_e7b0_4af933553480 71159b04_bfe4_5649_f456_03c4118fe861["with_raw_response()"] 80a3c9b9_302c_c9e6_2c40_26bda04d511b -->|method| 71159b04_bfe4_5649_f456_03c4118fe861 d0aff5df_5b99_65e1_1ef2_1aabd9cb85fb["with_streaming_response()"] 80a3c9b9_302c_c9e6_2c40_26bda04d511b -->|method| d0aff5df_5b99_65e1_1ef2_1aabd9cb85fb
Relationship Graph
Source Code
src/anthropic/lib/bedrock/_beta_messages.py lines 14–34
class Messages(SyncAPIResource):
create = FirstPartyMessagesAPI.create
@cached_property
def with_raw_response(self) -> MessagesWithRawResponse:
"""
This property can be used as a prefix for any HTTP method call to return the
the raw response object instead of the parsed content.
For more information, see https://www.github.com/anthropics/anthropic-sdk-python#accessing-raw-response-data-eg-headers
"""
return MessagesWithRawResponse(self)
@cached_property
def with_streaming_response(self) -> MessagesWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
For more information, see https://www.github.com/anthropics/anthropic-sdk-python#with_streaming_response
"""
return MessagesWithStreamingResponse(self)
Domain
Defined In
Extends
Source
Frequently Asked Questions
What is the Messages class?
Messages is a class in the anthropic-sdk-python codebase, defined in src/anthropic/lib/bedrock/_beta_messages.py.
Where is Messages defined?
Messages is defined in src/anthropic/lib/bedrock/_beta_messages.py at line 14.
What does Messages extend?
Messages extends SyncAPIResource.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free