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

Function _sanitize_primary

uncommon_route/connections_store.py:92–99  ·  view source on GitHub ↗
(raw: dict[str, Any])

Source from the content-addressed store, hash-verified

90
91
92def _sanitize_primary(raw: dict[str, Any]) -> PrimaryConnection:
93 primary = raw.get("primary")
94 if not isinstance(primary, dict):
95 return PrimaryConnection()
96 return PrimaryConnection(
97 upstream=_clean_text(primary.get("upstream")),
98 api_key=_clean_text(primary.get("api_key")),
99 )
100
101
102def mask_api_key(api_key: str) -> str:

Callers 1

__init__Method · 0.85

Calls 3

PrimaryConnectionClass · 0.85
_clean_textFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected