{"id":23538,"library":"dict-deep","title":"dict-deep","description":"A lightweight library providing deep_set and deep_get functions to access nested dictionaries (or any object) using dot-notation strings. Current version 4.1.2, Python >=3.5,<4.0. Maintained but infrequent releases.","status":"active","version":"4.1.2","language":"python","source_language":"en","source_url":"https://github.com/mbello/dict-deep","tags":["dict","nested","dot-notation","deep-get","deep-set"],"install":[{"cmd":"pip install dict-deep","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Package name uses underscore, not hyphen.","wrong":"from dictdeep import deep_get","symbol":"deep_get","correct":"from dict_deep import deep_get"},{"note":"","wrong":"from dict_deep import deep_set (same as correct, no common wrong import for this symbol)","symbol":"deep_set","correct":"from dict_deep import deep_set"}],"quickstart":{"code":"from dict_deep import deep_get, deep_set\n\nnested = {'a': {'b': {'c': 42}}}\n# Get value using dot-separated key\nval = deep_get(nested, 'a.b.c')\nprint(val)  # 42\n\n# Set value using dot-separated key\ndeep_set(nested, 'a.b.c', 99)\nprint(nested['a']['b']['c'])  # 99","lang":"python","description":"Demonstrates basic deep_get and deep_set with dot-notation strings."},"warnings":[{"fix":"Be aware that the original dict is mutated. If you need immutability, deepcopy before calling.","message":"deep_set modifies the original dict in place; it does not return a new dict.","severity":"gotcha","affected_versions":"all"},{"fix":"Use a list of keys instead of a dotted string when keys contain dots: deep_get(d, ['a.b'])","message":"Keys with dots in them are ambiguous: 'a.b' in dot-notation will be interpreted as a path, not a literal key.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace deep_update calls with deep_set for individual keys, or use dictionary update methods.","message":"deep_update was removed in v4.0. Use deep_set or manual update instead.","severity":"deprecated","affected_versions":">=4.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use the correct import: from dict_deep import deep_get","cause":"Attempting to import using hyphen in the package name: 'import dict-deep' is invalid.","error":"ModuleNotFoundError: No module named 'dict_deep'"},{"fix":"Ensure that intermediate keys point to a dict or are not set as leaf values before calling deep_set.","cause":"deep_set tries to traverse into an existing leaf value (e.g., an integer) to create nested dicts, but it can't override a non-dict.","error":"TypeError: 'int' object is not subscriptable"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}