flatten-dict icon indicating copy to clipboard operation
flatten-dict copied to clipboard

A flexible utility for flattening and unflattening dict-like objects in Python.

Results 6 flatten-dict issues
Sort by recently updated
recently updated
newest added

Hello! We're using flatten-dict in a typed context at work, so I created some stubs for it the other day. Felt like it could be nice to share them with...

flatten-dict enumerates all the lists if `enumerate_types=(list,)` regardless of the element types. The modification by this Pull Request adds flexibility to enumerate based on the element types while keeping the...

Flattening a nested dict that contains lists works great, but unflatten makes dicts instead of lists when index is list index. I rewrote part of your lib to unflatten for...

- `hook` Callable now added to flatten and unflatten - Fixed tests so that they point at local code instead of the installed package (which would be the last stable...

Original error: ``` In [4]: unflatten({1: ('a', 'b'), 2: ('a', 'b')}, inverse=True) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) in ----> 1 unflatten({1: ('a', 'b'), 2: ('a', 'b')}, inverse=True) ~/projects/flatten-dict/flatten_dict/flatten_dict.py...