Skip to main content
Glama
dependencies.py919 B
"""Dependency management and bootstrapping.""" import os def ensure_deps_once(): """Attempt to install requirements.txt once if critical imports fail.""" import sys import subprocess if getattr(ensure_deps_once, "_done", False): return req_path_candidates = [ os.path.join(os.path.dirname(__file__), "..", "requirements.txt"), os.path.abspath("requirements.txt"), ] req_path = next((p for p in req_path_candidates if os.path.exists(p)), None) if not req_path: ensure_deps_once._done = True return try: print(f"Dependencies missing. Attempting to install from: {req_path}") subprocess.check_call([sys.executable, "-m", "pip", "install", "-r", req_path]) except Exception as e: print(f"Warning: failed to install requirements automatically: {e}") finally: ensure_deps_once._done = True

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yuuues/mcp-sql'

If you have feedback or need assistance with the MCP directory API, please join our Discord server