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

Method get_env_key

env_manager.py:56–62  ·  view source on GitHub ↗

Return the value of *key* from os.environ or the .env file.

(self, key)

Source from the content-addressed store, hash-verified

54 f.write(f'{key}={value}\n')
55
56 def get_env_key(self, key):
57 """Return the value of *key* from os.environ or the .env file."""
58 val = os.environ.get(key)
59 if val:
60 return val
61 env = self._read_env_dict()
62 return env.get(key)
63
64 def set_env_key(self, key, value):
65 """Set a single key in the .env file (preserves other keys)."""

Callers 3

get_pushover_keysFunction · 0.95
save_pushover_keysFunction · 0.95
_get_keysMethod · 0.95

Calls 2

_read_env_dictMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected