PyZon - Zon parser in Python

With the upcoming build system changes I’ve written a Zon parser in Pure Python so I can parse the data in my python tooling.

Others might also find a use for it:
https://codeberg.org/Jan200101/pyzon
https://pypi.org/project/pyzon/

8 Likes

Out of curiosity, what are you doing with it in python tooling?

I have a tool that is intended to make vendoring zig dependencies easier for distros, the upcoming build system changes in 0.17.0 will remove the whole build runner system and instead expose the build graph information with a flag.

3 Likes

cool, it will make it easier to adopt .zon in non Zig projects

I have an alternative take on this:
https://codeberg.org/dasimmet/python-zig-zon
zig-zon · PyPI

its a native cpython extension using the zig standard library zon parser to convert .zon into python dictionaries,arrays, integers, strings, floats.
It should just compile during installation from pip :wink:

3 Likes

Oh incredible! I’m going adapt this to gdscript later. I’m currently exporting zon files from godot for my game, but I’d really like to pipe zon files in to configure my tools scripts.

2 Likes