MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / mask_api_key

Function mask_api_key

uncommon_route/connections_store.py:102–110  ·  view source on GitHub ↗
(api_key: str)

Source from the content-addressed store, hash-verified

100
101
102def mask_api_key(api_key: str) -> str:
103 value = _clean_text(api_key)
104 if not value:
105 return ""
106 if len(value) <= 4:
107 return "***"
108 if len(value) <= 8:
109 return f"{value[:2]}..."
110 return f"{value[:4]}...{value[-3:]}"
111
112
113class ConnectionsStore:

Callers 6

_providers_payloadFunction · 0.90
_connections_payloadFunction · 0.90
_providers_payloadFunction · 0.90
handle_provider_detailFunction · 0.90

Calls 1

_clean_textFunction · 0.85

Tested by 1