MCPcopy Create free account
hub / github.com/OpenDCAI/Paper2Any / load_project_env

Function load_project_env

script/cli_env.py:35–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33
34
35def load_project_env() -> None:
36 for key in PROXY_ENV_KEYS:
37 os.environ.pop(key, None)
38
39 if not ENV_FILE.is_file():
40 return
41
42 try:
43 from dotenv import load_dotenv
44 except Exception:
45 load_dotenv = None
46
47 if load_dotenv is not None:
48 load_dotenv(ENV_FILE, override=False)
49 return
50
51 _load_env_manually(ENV_FILE)
52
53
54def resolve_cli_text_credentials(api_url: str | None, api_key: str | None) -> tuple[str, str]:

Calls 1

_load_env_manuallyFunction · 0.85

Tested by

no test coverage detected