MCPcopy Create free account
hub / github.com/modelscope/ms-agent / load_env

Method load_env

ms_agent/config/env.py:32–38  ·  view source on GitHub ↗

Load .env into the process env, then merge with ``envs`` and return.

(envs: Dict[str, str] = None,
                 dotenv_path: Optional[str] = None)

Source from the content-addressed store, hash-verified

30
31 @staticmethod
32 def load_env(envs: Dict[str, str] = None,
33 dotenv_path: Optional[str] = None) -> Dict[str, str]:
34 """Load .env into the process env, then merge with ``envs`` and return."""
35 Env.load_dotenv_into_environ(dotenv_path)
36 _envs = copy(os.environ)
37 _envs.update(envs or {})
38 return _envs

Callers 4

connectMethod · 0.80
add_mcp_configMethod · 0.80
load_base_configFunction · 0.80
from_taskMethod · 0.80

Calls 2

updateMethod · 0.45

Tested by

no test coverage detected