MCPcopy Index your code
hub / github.com/theskumar/python-dotenv / set_as_environment_variables

Method set_as_environment_variables

src/dotenv/main.py:97–110  ·  view source on GitHub ↗

Load the current dotenv as system environment variable.

(self)

Source from the content-addressed store, hash-verified

95 yield mapping.key, mapping.value
96
97 def set_as_environment_variables(self) -> bool:
98 """
99 Load the current dotenv as system environment variable.
100 """
101 if not self.dict():
102 return False
103
104 for k, v in self.dict().items():
105 if k in os.environ and not self.override:
106 continue
107 if v is not None:
108 os.environ[k] = v
109
110 return True
111
112 def get(self, key: str) -> Optional[str]:
113 """ """

Callers 1

load_dotenvFunction · 0.95

Calls 1

dictMethod · 0.95

Tested by

no test coverage detected