MCPcopy
hub / github.com/mandarons/icloud-docker / get_username

Function get_username

src/config_parser.py:99–114  ·  view source on GitHub ↗

Get username from config. Args: config: Configuration dictionary Returns: Username string if found and valid, None otherwise

(config: dict)

Source from the content-addressed store, hash-verified

97
98
99def get_username(config: dict) -> str | None:
100 """Get username from config.
101
102 Args:
103 config: Configuration dictionary
104
105 Returns:
106 Username string if found and valid, None otherwise
107 """
108 config_path = ["app", "credentials", "username"]
109 if not traverse_config_path(config=config, config_path=config_path):
110 log_config_error(config_path, "username is missing. Please set the username.")
111 return None
112
113 username = get_config_value(config=config, config_path=config_path)
114 return validate_and_strip_username(username, config_path)
115
116
117def get_retry_login_interval(config: dict) -> int:

Callers

nothing calls this directly

Calls 4

traverse_config_pathFunction · 0.90
log_config_errorFunction · 0.90
get_config_valueFunction · 0.90

Tested by

no test coverage detected