first commit

This commit is contained in:
2026-02-25 23:49:54 -05:00
commit 4d097161cb
1775 changed files with 452827 additions and 0 deletions

17
test_query.py Normal file
View File

@@ -0,0 +1,17 @@
import asyncio
async def main():
from claude_agent_sdk import query, ClaudeAgentOptions
options = ClaudeAgentOptions(model="claude-3-5-sonnet-20241022", system_prompt="You are a helpful assistant.")
async for msg in query(prompt="Say a short hello.", options=options):
print(f"Message type: {type(msg)}")
print(f"Message content: {getattr(msg, 'content', 'No content')}")
if hasattr(msg, 'total_cost_usd'):
print(f"Cost: {msg.total_cost_usd}")
print(f"Usage: {getattr(msg, 'usage', 'No usage')}")
if hasattr(msg, '__dict__'):
print(f"Dict keys: {msg.__dict__.keys()}")
if __name__ == "__main__":
asyncio.run(main())