{"id":21487,"library":"json-flattener","title":"json-flattener","description":"Python library for denormalizing nested dicts or JSON objects to tabular form (CSV, TSV, Excel) and back. Current version 0.2.0, with a new poetry-based build and improved error handling. Maintained by the OBO Foundry community. Releases are occasional.","status":"active","version":"0.2.0","language":"python","source_language":"en","source_url":"https://github.com/cmungall/json-flattener","tags":["json","flatten","denormalize","csv","tsv","excel","data transformation"],"install":[{"cmd":"pip install json-flattener","lang":"bash","label":"Default install"}],"dependencies":[],"imports":[{"note":"","wrong":"","symbol":"JsonFlattener","correct":"from json_flattener import JsonFlattener"},{"note":"flatten is a top-level function, not a submodule","wrong":"from json_flattener.flatten import flatten","symbol":"flatten","correct":"from json_flattener import flatten"}],"quickstart":{"code":"from json_flattener import flatten\nnested = {'a': 1, 'b': {'c': 2, 'd': [3, 4]}}\nflat = flatten(nested)\nprint(flat)\n# Output: {'a': 1, 'b__c': 2, 'b__d__0': 3, 'b__d__1': 4}","lang":"python","description":"Flatten a nested dictionary to a flat dictionary with dot-separated keys."},"warnings":[{"fix":"Use flatten(nested, sep='.') for dot notation.","message":"The default separator is '__' (double underscore), not '.'. Many users expect a dot separator. You can customize with the 'sep' argument.","severity":"gotcha","affected_versions":"all"},{"fix":"Post-process keys or use a different flattening library if you need custom list handling.","message":"Flattening a list inside a dict creates keys with numeric indices (e.g., 'b__d__0'). This may not match your schema expectations.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install with: pip install json-flattener","cause":"Misspelled package name or not installed.","error":"ImportError: No module named 'json_flattener'"},{"fix":"Use sep='.' instead of separator='.'","cause":"Use of deprecated argument name 'separator' instead of 'sep'.","error":"TypeError: flatten() got an unexpected keyword argument 'separator'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}