Home / File/ text_completions_demo_async.py — anthropic-sdk-python Source File

text_completions_demo_async.py — anthropic-sdk-python Source File

Architecture documentation for text_completions_demo_async.py, a python file in the anthropic-sdk-python codebase. 2 imports, 0 dependents.

File python AnthropicClient AsyncAPI 2 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  7bace2df_8032_f6b5_4885_a5a660f7c90b["text_completions_demo_async.py"]
  22e54b11_c61c_96dc_bf33_dfc7151750e9["asyncio"]
  7bace2df_8032_f6b5_4885_a5a660f7c90b --> 22e54b11_c61c_96dc_bf33_dfc7151750e9
  d10c5377_2939_0f0b_cc44_8759393f2853["anthropic"]
  7bace2df_8032_f6b5_4885_a5a660f7c90b --> d10c5377_2939_0f0b_cc44_8759393f2853
  style 7bace2df_8032_f6b5_4885_a5a660f7c90b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

#!/usr/bin/env -S poetry run python

import asyncio

import anthropic
from anthropic import AsyncAnthropic


async def main() -> None:
    client = AsyncAnthropic()

    res = await client.completions.create(
        model="claude-sonnet-4-5-20250929",
        prompt=f"{anthropic.HUMAN_PROMPT} how does a court case get to the Supreme Court? {anthropic.AI_PROMPT}",
        max_tokens_to_sample=1000,
    )
    print(res.completion)


asyncio.run(main())

Subdomains

Functions

Dependencies

  • anthropic
  • asyncio

Frequently Asked Questions

What does text_completions_demo_async.py do?
text_completions_demo_async.py is a source file in the anthropic-sdk-python codebase, written in python. It belongs to the AnthropicClient domain, AsyncAPI subdomain.
What functions are defined in text_completions_demo_async.py?
text_completions_demo_async.py defines 1 function(s): main.
What does text_completions_demo_async.py depend on?
text_completions_demo_async.py imports 2 module(s): anthropic, asyncio.
Where is text_completions_demo_async.py in the architecture?
text_completions_demo_async.py is located at examples/text_completions_demo_async.py (domain: AnthropicClient, subdomain: AsyncAPI, directory: examples).

Analyze Your Own Codebase

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

Try Supermodel Free