minipb
minipb copied to clipboard
"SAP" streaming parser API?
I might implement this if I feel like it but just wanted to drop the idea here. So basically this library is ideal for micropython on low memory devices, but doesn't have a way to parse bigger-than-ram inputs.
It seems like the core API up until _break_down
is already an iterator that reads from a file-like object. So it seems like you'd just have to write a IterWire
subclass that returns an iterator like (path, value)
instead of assembling a dict or tuple. Would be a fun puzzle.
Interesting idea. I currently don't have time dedicated to this library but feel free to send a PR if anyone got it working.