larzenv
Load .env files, keep secrets safe.
Real apps need config and secrets (API keys, database URLs) that must NOT live in your source or Git history. larzenv parses .env files into a dict with a typed getter, so you do configuration properly from your first real project. Pairs with the GIT-101 secrets lesson.
larzscript pkg install env
What you get
- parse/load .env to a dict
- Typed get() (int/float/bool)
- Comments, export, quotes
- Keep secrets out of Git
Try it
import "env" as env_ let text = "PORT=8080\nDEBUG=true\n# a comment\nexport NAME=\"larz app\"\n" let e = env_.parse(text) print(env_.get_int(e, "PORT", 3000)) print(env_.get_bool(e, "DEBUG", false)) print(env_.get(e, "NAME"))
Output
8080 true larz app
Why it's in the Larz Stack
larzenv is a real Larzscript package (larzscript pkg install env) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.