MCPcopy
hub / github.com/modelcontextprotocol/python-sdk / _parse_env_var

Function _parse_env_var

src/mcp/cli/cli.py:56–62  ·  view source on GitHub ↗

Parse environment variable string in format KEY=VALUE.

(env_var: str)

Source from the content-addressed store, hash-verified

54
55
56def _parse_env_var(env_var: str) -> tuple[str, str]: # pragma: no cover
57 """Parse environment variable string in format KEY=VALUE."""
58 if "=" not in env_var:
59 logger.error(f"Invalid environment variable format: {env_var}. Must be KEY=VALUE")
60 sys.exit(1)
61 key, value = env_var.split("=", 1)
62 return key.strip(), value.strip()
63
64
65def _build_uv_command(

Callers 1

installFunction · 0.85

Calls 2

errorMethod · 0.80
exitMethod · 0.45

Tested by

no test coverage detected