Omnist Tutorial
A hands-on, verified-code walkthrough of every model and feature, using the Python port. Every example on every page was actually run against the real library — the output shown is real output, not typed by hand.
- 01Why Omnist
The problem this exists to solve, and what it makes possible.
- 02Setup
Install the Python port and import what you need.
- 03The Document model
Build, navigate, and mutate a Document — the one tree every format reads into.
- 04OML — the native format
Omnist's own text syntax for the Document model.
- 05OSD — schema syntax
Named records, cardinality, and the three kinds of field a schema can declare.
- 06Building and reading a schema in Python
Construct a Schema from Python instead of OSD text — and inspect one already in hand.
- 07Validation
Check whether a Document conforms to a Schema, and read the real diagnostics.
- 08Materialization
Upgrade untyped leaves (a JSON string) to the type a schema declares.
- 09Reading and writing JSON, YAML, TOML, XML
The other four codecs — and what happens when a value doesn't fit.
- 10Schema algebra
Six decidable operations over schemas — comparison, minimization, extraction.
- 11Inferring a schema
Draft a schema from example documents instead of writing one by hand.
- 12Custom formats
Register your own format plugin — usable everywhere Doc reads and writes by name.
- 13A real-life example
Named records, a required array, an optional field, and recursion-free reuse — built once, validated across formats.
- 14The command line
Every operation above, without writing any code.
- 15Next steps
Where to go from here.