-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverify_python_sdks.py
More file actions
52 lines (45 loc) · 1.63 KB
/
verify_python_sdks.py
File metadata and controls
52 lines (45 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env python3
"""
Verification script for Python SDK installations
"""
import sys
print("Verifying Python SDK installations...\n")
failed_imports = []
# Test Google Gemini / GenAI
try:
import google.generativeai as genai
print("✓ Google Generative AI SDK installed successfully")
print(f" Version: {genai.__version__ if hasattr(genai, '__version__') else 'Available'}")
except ImportError as e:
print(f"✗ Google Generative AI SDK failed: {e}")
failed_imports.append("google-generativeai")
# Test Anthropic Claude SDK
try:
import anthropic
print("✓ Anthropic SDK installed successfully")
print(f" Version: {anthropic.__version__ if hasattr(anthropic, '__version__') else 'Available'}")
except ImportError as e:
print(f"✗ Anthropic SDK failed: {e}")
failed_imports.append("anthropic")
# Test OpenAI SDK (e.g., GPT-3.5-turbo, GPT-4)
try:
import openai
print("✓ OpenAI SDK installed successfully")
print(f" Version: {openai.__version__ if hasattr(openai, '__version__') else 'Available'}")
except ImportError as e:
print(f"✗ OpenAI SDK failed: {e}")
failed_imports.append("openai")
# Test MCP SDK
try:
import mcp
print("✓ Model Context Protocol SDK installed successfully")
print(f" Version: {mcp.__version__ if hasattr(mcp, '__version__') else 'Available'}")
except ImportError as e:
print(f"✗ MCP SDK failed: {e}")
failed_imports.append("mcp")
if failed_imports:
print(f"\n✗ Python SDK verification failed. {len(failed_imports)} SDK(s) failed to import.")
sys.exit(1)
else:
print("\n✓ All Python SDKs verified successfully!")
sys.exit(0)