Get a configuration value by dot-separated key. Args: key: Dot-separated key path (e.g., "server.port") default: Default value if key not found Returns: Configuration value or default
(self, key: str, default: Any = None)
| 131 | base[key] = value |
| 132 | |
| 133 | def get(self, key: str, default: Any = None) -> Any: |
| 134 | """Get a configuration value by dot-separated key. |
| 135 | |
| 136 | Args: |
| 137 | key: Dot-separated key path (e.g., "server.port") |
| 138 | default: Default value if key not found |
| 139 | |
| 140 | Returns: |
| 141 | Configuration value or default |
| 142 | """ |
| 143 | parts = key.split(".") |
| 144 | value = self._config |
| 145 | |
| 146 | for part in parts: |
| 147 | if isinstance(value, dict) and part in value: |
| 148 | value = value[part] |
| 149 | else: |
| 150 | return default |
| 151 | |
| 152 | return value |
| 153 | |
| 154 | def set(self, key: str, value: Any) -> None: |
| 155 | """Set a configuration value by dot-separated key. |
no outgoing calls