larzconf
Layered typed configuration.
Layered configuration from dicts, JSON, .env, environment and files with deep-merge, typed access, dotted paths, env-prefix nesting and schema validation.
larzscript pkg install conf
What you get
- Layered deep-merge
- Typed + dotted paths
- .env & env-prefix nesting
- Schema validation
Try it
import "conf" as conf
let base = {"db": {"host": "localhost", "port": 5432}}
let override = {"db": {"port": 5433}}
let merged = conf.merge(base, override)
print(conf.get(merged, "db.port", nil))
conf.set(merged, "db.name", "app")
print(conf.get(merged, "db.name", nil))
print(conf.validate(merged, {"db.host": "string", "db.missing": "number"}))Output
5433 app [db.missing is missing]
Why it's in the Larz Stack
larzconf is a real Larzscript package (larzscript pkg install conf) - 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.