{"id":21117,"library":"deflate-dict","title":"deflate-dict","description":"A Python library for inflating and deflating nested dictionaries. Deflate flattens nested dicts into key paths, and inflate reverses the process. Current version 1.2.2, stable maintenance.","status":"active","version":"1.2.2","language":"python","source_language":"en","source_url":"https://github.com/LucaCappelletti94/deflate_dict","tags":["dictionary","flatten","nest","utility"],"install":[{"cmd":"pip install deflate-dict","lang":"bash","label":"Default install"}],"dependencies":[],"imports":[{"note":"Top-level import is preferred.","wrong":"from deflate_dict.deflate import deflate","symbol":"deflate","correct":"from deflate_dict import deflate"},{"note":"Top-level import is preferred.","wrong":"from deflate_dict.inflate import inflate","symbol":"inflate","correct":"from deflate_dict import inflate"}],"quickstart":{"code":"from deflate_dict import deflate, inflate\nnested = {'a': {'b': 1, 'c': 2}}\nflat = deflate(nested)\nprint(flat)  # {'a.b': 1, 'a.c': 2}\nrestored = inflate(flat)\nprint(restored)  # {'a': {'b': 1, 'c': 2}}","lang":"python","description":"Deflate a nested dict and inflate it back."},"warnings":[{"fix":"deflate(nested, separator='__') or inflate(flat, separator='__')","message":"Default separator is '.' which can clash with keys containing dots. Use `separator` parameter to choose a safe delimiter.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure no ambiguous key patterns before inflating.","message":"Inflation assumes no overlapping key paths. If a flattened key like 'a.b' and a nested key like 'a' with value exist, behavior may be unexpected.","severity":"gotcha","affected_versions":"all"},{"fix":"Convert non-string keys to strings before deflating.","message":"The library does not handle non-string keys for deflation. Keys must be strings or convertible to strings.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.2.2':27 'current':25 'deflat':2,10,13 'deflate-dict':1 'dict':3,16 'dictionari':12,30 'flatten':14,31 'inflat':8,21 'key':18 'librari':6 'mainten':29 'nest':11,15,32 'path':19 'process':24 'python':5 'revers':22 'stabl':28 'util':33 'version':26","created_at":"2026-04-27T16:58:10.366150+00:00","updated_at":"2026-04-27T16:58:10.366150+00:00","problems":[{"fix":"Ensure nested values are dicts, not lists. Wrap lists in a dict if needed.","cause":"Passing a list as a value deeply nested; deflate expects dicts as nested structures.","error":"TypeError: unhashable type: 'list'"},{"fix":"Check that the flat dict contains keys exactly matching the deflated output, or use custom separator consistently.","cause":"Inflation attempted on a flat dict missing some expected keys or using wrong separator.","error":"KeyError: 'some.path'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.2.2","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/LucaCappelletti94/deflate_dict","docs":null,"changelog":null,"pypi":"https://pypi.org/project/deflate-dict/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization","data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-28","install_tag":null}}