MCPcopy Create free account
hub / github.com/agenticsorg/edge-agents / get_config_value

Function get_config_value

scripts/agents/devops/src/core/config.py:235–256  ·  view source on GitHub ↗

Get a configuration value by key path. Args: key_path: Dot-separated path to the configuration value default: Default value if key doesn't exist Returns: Configuration value or default

(key_path: str, default: Any = None)

Source from the content-addressed store, hash-verified

233
234
235def get_config_value(key_path: str, default: Any = None) -> Any:
236 """
237 Get a configuration value by key path.
238
239 Args:
240 key_path: Dot-separated path to the configuration value
241 default: Default value if key doesn't exist
242
243 Returns:
244 Configuration value or default
245 """
246 config = get_config()
247 keys = key_path.split('.')
248
249 # Navigate through the nested dictionaries
250 current = config
251 for key in keys:
252 if not isinstance(current, dict) or key not in current:
253 return default
254 current = current[key]
255
256 return current
257
258
259def set_config_value(key_path: str, value: Any) -> None:

Callers

nothing calls this directly

Calls 1

get_configFunction · 0.85

Tested by

no test coverage detected