unknown
Claude Opus 5.5
Harden rewrite integrity, stop the final polish undoing humanization, add tests
585f232
Raw History Blame Contribute Delete
572 Bytes
"""Local development: load KEY=VALUE lines from ../.env into the environment (the Space gets these as secrets)."""
import os
from pathlib import Path
def load(path=None):
p = Path(path) if path else Path(__file__).resolve().parent.parent / ".env"
if not p.exists():
return
for line in p.read_text(encoding="utf-8").splitlines():
line = line.strip()
if not line or line.startswith("#") or "=" not in line:
continue
k, v = line.split("=", 1)
os.environ.setdefault(k.strip(), v.strip().strip('"').strip("'"))