We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/devonmojito/ton-blockchain-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
modules.py•587 B
import importlib
from pathlib import Path
from types import ModuleType
from typing import Union
def import_file(name: str, loc: Union[str, Path]) -> ModuleType:
"""Import module from a file. Used to load models from a directory.
name (str): Name of module to load.
loc (str / Path): Path to the file.
RETURNS: The loaded module.
"""
spec = importlib.util.spec_from_file_location(name, str(loc)) # type: ignore
module = importlib.util.module_from_spec(spec) # type: ignore
spec.loader.exec_module(module) # type: ignore[union-attr]
return module