MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / async_client

Function async_client

examples/vertex.py:24–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22
23
24async def async_client() -> None:
25 print("------ Async Vertex ------")
26
27 client = AsyncAnthropicVertex()
28
29 message = await client.messages.create(
30 model="claude-sonnet-4@20250514",
31 max_tokens=1024,
32 messages=[
33 {
34 "role": "user",
35 "content": "Hello!",
36 }
37 ],
38 )
39 print(message.to_json())
40
41
42sync_client()

Callers 1

vertex.pyFile · 0.70

Calls 3

to_jsonMethod · 0.80
createMethod · 0.45

Tested by

no test coverage detected