INNER CODE UNIT · Python

load_env

browser-use/bux · agent/box_agent.py:85

def load_env() -> dict[str, str]:
	"""Parse /etc/bux/env written by user-data at first boot.

	Returns dict of KEY=VAL pairs; missing file → empty dict.
	"""
	if not ENV_PATH.exists():
		return {}
	out: dict[str, str] = {}
	for line in ENV_PATH.read_text().splitlines():
		line = line.strip()
		if not line or line.startswith('#') or '=' not in line:
			continue
		k, v = line.split('=', 1)
		out[k.strip()] = v.strip().strip('"').strip("'")
	return out


def _read_tg_bot_username() -> str | None:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…