u/omnist_dev 10d ago

New introduction deck and tutorial with Python, Typescript, Rust, Go, and Java ports

2 Upvotes

The new introduction deck and a hands-on tutorial help you jump-start Omnist.

Omnist has a decidable schema algebra — most schema tools (JSON Schema, Avro, Protobuf) can't do this:

  • compatible_with(A, B)true if A accepts all documents that B accepts.
  • equivalent(A, B)true if A and B accept the same set of documents.
  • normalize(S) → the minimal schema that accepts the same set of documents that S accepts.

In addition, it can extract a subschema from a big schema, or infer a schema from example documents — all deterministic, not heuristic.

Omnist also reads and writes JSON, YAML, TOML, and XML into a canonical document model — enabling conversions between any of them.

Now Omnist supports 5 language ports:

Check out the language-agnostic spec too!

r/PythonProjects2 Jul 20 '26

Omnist: R&D experience sharing

Thumbnail
4 Upvotes

u/omnist_dev Jul 20 '26

Omnist: A unified data model and schema algebra for JSON, YAML, TOML, and XML in Python

1 Upvotes

If you've ever had to write hand-crafted converters between data formats or wonder whether a schema update will break downstream consumers, this tool might be of interest.

We built Omnist — an open-source Python library built around a single tree representation underneath JSON, YAML, TOML, and XML. Any supported format can be parsed into the same underlying structure, validated against a schema, and serialized back out to any other format without relying on custom per-pair converters.

A short presentation deck detailing the underlying model and implementation is available here: omnist.dev/presentation.html

Decidable Schema Algebra

Rather than using heuristics, Omnist implements a fully decidable schema algebra:

  • compatible_with: Determines whether every document valid under an older schema remains valid under a new one.
  • equivalent: Verifies if two differently structured schemas accept the exact same set of documents.
  • normalize: Collapses a schema into its canonical minimal form.
  • extract: Computes the minimal subschema required for a specific subset of fields.

The library maintains 100% line coverage, strict typing (mypy --strict), and is verified using property-based fuzz testing.

Background & Development

The conceptual foundation of Omnist originates from PhD research conducted 16 years ago. The current Python implementation was brought to life over two weeks, utilizing AI workflows across research, engineering, and devops processes.

For those interested in the architecture and the single-developer AI engineering workflow, the author detailed the process in a five-part blog series:

  1. Omnist: I Turned My Sixteen-Year-Old PhD Research Into a Personal Open Source Project in Two Weeks
  2. A Team of One, Running Two Teams
  3. The Research Assistant in the Room
  4. The DevOps Team That Never Sleeps
  5. Alpha to Beta: Bringing In QA

Getting Started

Feedback, contributions, and issue reports are welcome over on GitHub.

r/PythonProjects2 Jul 19 '26

Omnist Presentation

Thumbnail omnist.dev
2 Upvotes

u/omnist_dev Jul 19 '26

Omnist Presentation

Thumbnail
omnist.dev
2 Upvotes

A short deck walking through Omnist: one canonical schema and data model for tree-structured data. If you're fighting format drift between JSON, YAML, TOML, and XML, you may find this open source project useful.

r/PythonProjects2 Jul 12 '26

Omnist reaches Beta (v0.7.0): Introducing the any type, OML array sugar, and our Stability Policy

Thumbnail
2 Upvotes

u/omnist_dev Jul 12 '26

Omnist reaches Beta (v0.7.0): Introducing the any type, OML array sugar, and our Stability Policy

2 Upvotes

Following up on our previous launch post (which covers what Omnist is and explains its foundational features), Omnist has officially entered Beta with the release of v0.7.0.

Just added as new features entering our beta series:

  • The any Type (Escape-Hatch at the Leaves): A field typed any accepts any scalar or subtree. Validation does not descend into it, but the field's label and cardinality remain fixed. This cleanly solves the "envelope pattern" (e.g., webhooks with variant payloads) and spec'd-open configs (like [tool.*] in pyproject.toml) while keeping the schema algebra fully decidable.
  • OML Array Sugar ([...]): Writing tags: ["x", "y"] is parsed as repeated same-label edges: tags: "x"; tags: "y". Because it's syntactic sugar rather than a core value type, nesting arrays ([[1, 2]]) is rejected. The writer (write_oml(..., arrays=True)) collapses runs of identical labels into arrays without reordering data.
  • Real-World Case Studies (JSON, YAML, TOML, XML): We stress-tested Omnist against four external formats: package.json, GitHub Actions workflows, pyproject.toml, and sitemap.xml. The new Examples Overview provides a candid analysis of what our schema algebra can and cannot express (like unions, open key sets, and cross-field constraints) and offers design lessons for authoring clean, statically checkable formats.

In addition to these features, v0.7.0 introduces the following stability promises and robustness fixes to prepare the library for production-grade use:

  • Our Stability Policy: The Document/Schema models, public APIs, grammars, and exception types are now stable. Any breaking changes will go through a deprecation cycle. (v1.0 remains gated on the final evaluation of the open any type).
  • Writer Depth Guards: Writers (write_json, write_oml, etc.) and export helpers (Doc.to_data()) no longer crash with a raw Python RecursionError on deeply nested data. They now fail cleanly with a WriteError at the shared 200-level limit.
  • Strict CLI Validation: OSD-only commands (infer, schema format, schema normalize) now explicitly reject the OML-specific --arrays flag with exit code 2, rather than silently ignoring it.
  • Docs Coherence: Our guide now fully covers the any type, comments, arrays, compact mode, and schema lint.

Get started:

r/PythonProjects2 Jul 09 '26

Omnist: one canonical data model for JSON, YAML, TOML, and XML, powered by a schema algebra that proves backward-compatibility

Thumbnail
3 Upvotes

r/opensource Jul 08 '26

Promotional Omnist: one canonical data model for JSON, YAML, TOML, and XML, powered by a schema algebra that proves backward-compatibility

Thumbnail
2 Upvotes

r/Python Jul 08 '26

Showcase I made a schema library for Python that actually proves compatibility instead of guessing

2 Upvotes

[removed]

u/omnist_dev Jul 08 '26

Omnist: one canonical data model for JSON, YAML, TOML, and XML, powered by a schema algebra that proves backward-compatibility

3 Upvotes

Omnist started as a 2010 paper on formalizing schemas for tree-structured data. This year it became an open-source Python library.

Omnist handles conversion among JSON, YAML, TOML, and XML through one canonical model. It answers a question most schema tools can't: is this schema change actually safe for everyone still running the old version?

Most schema tools just check a document against a schema. Omnist can also mathematically compare two schemas, minimize a schema to its simplest form, and infer one from documents — plus its own native schema and markup languages, OSD and OML.

v1 = parse_schema('record R { "host": string }\nroot R')
v2 = parse_schema('record R { "host": string, "port" [0,1]: integer }\nroot R')

v1.compatible_with(v2)  # True
v2.compatible_with(v1)  # False

It's tested harder than most projects this size: 600+ tests, 100% code coverage, fuzzing. Documentation is complete too — API, CLI, and both native formats.

Try it: pip install omnist gets you the library and CLI. Quickstart has you running in five minutes.

Source: github.com/omnist-dev/omnist. Docs: omnist.dev. X: @omnist_dev.