INNER CODE UNIT · Python
ensure_dependencies
RekklesNA/ProxmoxMCP-Plus · main.py:11
def ensure_dependencies():
"""Checks for required libraries and fails fast if missing."""
missing = []
for pkg in ["mcp", "proxmoxer", "pydantic", "fastapi", "uvicorn", "anyio"]:
try:
__import__(pkg)
except ImportError:
missing.append(pkg)
if not missing:
print("MCP Bundle: All core dependencies detected.", file=sys.stderr)
sys.stderr.flush()
return
raise RuntimeError(
"Missing runtime dependencies: "
+ ", ".join(missing)
+ ". Install dependencies during build/deploy time instead of runtime."