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

AsyncMessages Class — anthropic-sdk-python Architecture

Architecture documentation for the AsyncMessages class in _beta_messages.py from the anthropic-sdk-python codebase.

Entity Profile

Dependency Diagram

graph TD
  470d84bd_a3d7_70f8_f019_f873e800d208["AsyncMessages"]
  f98629a5_73f4_23f2_1f7f_c8db837848d1["AsyncAPIResource"]
  470d84bd_a3d7_70f8_f019_f873e800d208 -->|extends| f98629a5_73f4_23f2_1f7f_c8db837848d1
  9f8cfa61_f82b_899e_e7b0_4af933553480["_beta_messages.py"]
  470d84bd_a3d7_70f8_f019_f873e800d208 -->|defined in| 9f8cfa61_f82b_899e_e7b0_4af933553480
  1cd96b65_76c1_b13a_3a03_d63d925506b1["with_raw_response()"]
  470d84bd_a3d7_70f8_f019_f873e800d208 -->|method| 1cd96b65_76c1_b13a_3a03_d63d925506b1
  913688b8_0eeb_86f2_501c_cdd7f7422519["with_streaming_response()"]
  470d84bd_a3d7_70f8_f019_f873e800d208 -->|method| 913688b8_0eeb_86f2_501c_cdd7f7422519

Relationship Graph

Source Code

src/anthropic/lib/bedrock/_beta_messages.py lines 37–57

class AsyncMessages(AsyncAPIResource):
    create = FirstPartyAsyncMessagesAPI.create

    @cached_property
    def with_raw_response(self) -> AsyncMessagesWithRawResponse:
        """
        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 AsyncMessagesWithRawResponse(self)

    @cached_property
    def with_streaming_response(self) -> AsyncMessagesWithStreamingResponse:
        """
        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 AsyncMessagesWithStreamingResponse(self)

Frequently Asked Questions

What is the AsyncMessages class?
AsyncMessages is a class in the anthropic-sdk-python codebase, defined in src/anthropic/lib/bedrock/_beta_messages.py.
Where is AsyncMessages defined?
AsyncMessages is defined in src/anthropic/lib/bedrock/_beta_messages.py at line 37.
What does AsyncMessages extend?
AsyncMessages extends AsyncAPIResource.

Analyze Your Own Codebase

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

Try Supermodel Free