flatdict
flatdict copied to clipboard
Python module for interacting with nested dicts as a single level dict with delimited keys.
Add a `guess_lists` option to `FlatterDict.as_dict()` which, when unflattening a `FlatterDict` containing no information about `original_types`, attempts to guess which of its sub-dicts should actually be lists. Addresses #49 A...
There was a mistake in the logic when it tries to split KEY-string by delimiter even in case if there is only digits index in the line. Added scoped fix,...
The following ``` import flatdict fdoc = flatdict.FlatterDict({'a': [3, 4]}) fdoc['a:0'] = 1 ``` should set the first element of the list `a` but it raises the an error ```...
Unflattening a `FlatterDict` with list values works fine if that `FlatterDict` object was created from a dict with list values. However, if that dict is converted to a plain old...
Hello, I apologize if I misunderstand the documentation but what is the purpose of the as_dict() help function? ``` import flatdict >>> c = flatdict.FlatDict({"a": {"b":1}}) >>> print(type(c), c) {'a:b':...
This is an Enhancement suggestion that I thought would be useful. Currently, the new key name is a combination of `parent-key + delimiter + child-key`. However, there can be a...
If you have a value that is an empty dict, it will be set as another FlatDict, that is not cast back by as_dict(). Actual: ``` >>> FlatDict({'a': {}}).as_dict() {'a':...
I try to convert all values of a FlatterDict to strings. The email field caused an exception. See below ``` data = { "x": "12", "other": "MLL", "channel": 33, "language":...
Move Installation guide before Usage. @gmr
## Problem When a key contains the same string as previous key error below is thrown. ``` $ python test.py Traceback (most recent call last): File "test.py", line 8, in...