MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _read_env_dict

Method _read_env_dict

env_manager.py:38–48  ·  view source on GitHub ↗

Read all key=value pairs from the .env file into a dict.

(self)

Source from the content-addressed store, hash-verified

36 # ------------------------------------------------------------------
37
38 def _read_env_dict(self):
39 """Read all key=value pairs from the .env file into a dict."""
40 env = {}
41 if os.path.exists(self.env_file_path):
42 with open(self.env_file_path, 'r') as f:
43 for line in f:
44 line = line.strip()
45 if line and not line.startswith('#') and '=' in line:
46 key, value = line.split('=', 1)
47 env[key] = value
48 return env
49
50 def _write_env_dict(self, env):
51 """Persist a full dict back to the .env file."""

Callers 3

get_env_keyMethod · 0.95
set_env_keyMethod · 0.95
delete_env_keyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected