Spaces:
Running on Zero
Running on Zero
File size: 357 Bytes
efcfce5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | """Load .env from repo root or week8 folder."""
from pathlib import Path
from dotenv import load_dotenv
WEEK8_DIR = Path(__file__).resolve().parent
REPO_ROOT = WEEK8_DIR.parent
def load_project_env() -> None:
for path in (REPO_ROOT / ".env", WEEK8_DIR / ".env"):
if path.exists():
load_dotenv(path, override=True)
|