Initialize the EnvManager. Args: env_path: Path to the .env file example_path: Path to .env.example (used for initialization)
(self, env_path: Path, example_path: Optional[Path] = None)
| 258 | } |
| 259 | |
| 260 | def __init__(self, env_path: Path, example_path: Optional[Path] = None): |
| 261 | """ |
| 262 | Initialize the EnvManager. |
| 263 | |
| 264 | Args: |
| 265 | env_path: Path to the .env file |
| 266 | example_path: Path to .env.example (used for initialization) |
| 267 | """ |
| 268 | self.env_path = env_path |
| 269 | self.example_path = example_path |
| 270 | self._values: Dict[str, str] = {} |
| 271 | self._original_values: Dict[str, str] = {} |
| 272 | self._file_lines: List[str] = [] |
| 273 | self._hot_reload_callbacks: List[Callable[[Dict[str, str]], None]] = [] |
| 274 | |
| 275 | # Load the file |
| 276 | self.load() |
| 277 | |
| 278 | def load(self) -> None: |
| 279 | """Load and parse the .env file.""" |