glom
Restructuring data, the Python way.
glom is a new approach to working with data in Python, featuring:
Path-based access for nested structures
Declarative data transformation using lightweight, Pythonic specifications
Readable, meaningful error messages
Built-in debugging features
Plus, deep assignment, streaming, data validation, and more!
While it may sound like a lot, glom’s straightforward approach becomes second-nature very quickly. Start with the tutorial, or try glom in your browser now!
Installation
glom is pure Python, and tested on Python 3.7+, as well as PyPy3. Installation is easy:
pip install glom
Then you’re ready to get glomming!
from glom import glom
target = {'a': {'b': {'c': 'd'}}}
glom(target, 'a.b.c') # returns 'd'
There’s much, much more to glom, check out the glom Tutorial and API reference!
Just glom it! ☄️
Learning glom
API Reference
Extending glom