Skip to main content
Glama
purity3
by purity3
api_utils.py461 B
""" API相关工具函数 """ def mask_api_key(api_key: str) -> str: """ 对API密钥进行部分隐藏处理 Args: api_key: 原始API密钥 Returns: 部分隐藏后的API密钥 """ if not api_key or len(api_key) < 8: return "***" # 保留前4位和后4位,中间用*替代 visible_chars = 4 return api_key[:visible_chars] + "*" * (len(api_key) - visible_chars * 2) + api_key[-visible_chars:]

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/purity3/fastapi-mcp-server'

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