glom
glom copied to clipboard
☄️ Python's nested data operator (and CLI), for all your declarative restructuring needs. Got data? Glom it! ☄️
Glom looks very promising. But a bit confusing when you read the documentation first time. Simple examples based on Book Store dictionary and mapped to jq/jsonpath/xpath would help a lot....
there are a few things pushing us to move from a scope to a virtual machine: 1 - performance a - sticking target, spec, UP, MODE etc on the scope...
with a little bit of care we can get rid of weakrefs inside T and significantly speed it up
I didn't realize that `First()` existed until I went poking around in the source today. `First(predicate)` is a nice shortcut for `Iter().first(predicate)`, but it isn't mentioned in the "Streaming &...
I am trying to get all elements from nested lists of classes, using glom. I have the following definitions: ```python class U: def __init__(self, c): self.as = [A(cc) for cc...
there was some prototyping of `scope[Path]` as a mechanism for tracking target path, but there are some flaws and also it eats a lot of performance for light specs (e.g....
It's easy to change mode, then swing back around when referencing the Ref() and now we're glomming that Ref() with a new mode, causing issues. Currently solved like this: https://github.com/mahmoud/glom/pull/196/files#diff-ef0db10c99b24c597e546561d07e34bbR211
I have some array of objects like this: ``` target = [ {'id': 0}, {'id': 1}, ... ] ``` I now want to get the object with id=0 for example....
One test is failing CI, not sure how it relates quite yet. Several notes at the bottom of streaming.py.
just had a thought -- not sure if this is feasible but probably worth looking into it would be great if `[subspec]` simply preserved the laziness of the target it...