larztoml
TOML read and write.
Reads and writes a real TOML subset — key = value pairs, [section] and [section.sub] headers (dotted -> nested dict), strings/ints/floats/bools/arrays-of-scalars, and # comments. Not full TOML - no inline tables, no array-of-tables, no multi-line strings, a deliberately small correct subset.
larzscript pkg install toml
What you get
- Read AND write TOML
- Nested [section.sub] tables
- Typed values + comments
- Deliberately small, correct subset
Try it
import "toml" as toml
let data = toml.parse("title = \"demo\"\n\n[db]\nport = 5432\ntags = [\"a\", \"b\"]\n")
print(data["title"], data["db"]["port"], data["db"]["tags"])
print(toml.stringify(data))Output
demo 5432 [a, b] title = "demo" [db] port = 5432 tags = ["a", "b"]
Why it's in the Larz Stack
larztoml is a real Larzscript package (larzscript pkg install toml) - 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.