-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverify_setup.py
More file actions
50 lines (41 loc) · 1.22 KB
/
verify_setup.py
File metadata and controls
50 lines (41 loc) · 1.22 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
"""
Verification script to test the Python environment setup
"""
import sys
def check_imports():
"""Check if all required packages can be imported"""
print("🔍 Checking Python environment...\n")
packages = {
"fastapi": "FastAPI",
"uvicorn": "Uvicorn",
"pydantic": "Pydantic",
"cryptography": "Cryptography",
"Crypto": "PyCryptodome",
"ipfshttpclient": "IPFS HTTP Client",
"sqlalchemy": "SQLAlchemy",
"pytest": "Pytest",
"jwt": "PyJWT",
"requests": "Requests",
"aiohttp": "aiohttp",
"black": "Black",
"isort": "isort",
}
failed = []
for module, name in packages.items():
try:
__import__(module)
print(f"✅ {name}")
except ImportError as e:
print(f"❌ {name} - {e}")
failed.append(name)
print(f"\n{'='*50}")
if not failed:
print("✨ All packages installed successfully!")
print(f"🐍 Python version: {sys.version}")
return True
else:
print(f"⚠️ Failed to import: {', '.join(failed)}")
return False
if __name__ == "__main__":
success = check_imports()
sys.exit(0 if success else 1)