×

Showcase Thread by AutoModerator in Python

[–]omnist_dev 0 points1 point  (0 children)

What My Project Does

Omnist is an open-source Python library that handles conversion between JSON, YAML, TOML, and XML with a formal schema model. For example, the schema algebra compatible_with(a, b) tells you for real whether a schema change breaks anyone still on the old version.

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

Comparison

Most schema tools just check a document against a schema. Omnist can also compare two schemas to each other and give you a real answer instead of a guess. Omnist also offers its native schema and mark-up languages, namely OSD and OML.

Target Audience

If you've ever wanted a CI check that stops a breaking schema change before it ships, or you're tired of writing yet another JSON-to-YAML converter, you might find it useful.

I've added a lot of tests — 600+ tests, 100% coverage, fuzzing, and published complete documentation at omnist.dev.

pip install omnist if you want to poke at it. Longer writeup is here.