{"id":27693,"library":"diffplus","title":"Diffplus","description":"Diffplus is a Python library for computing incremental and contextual diffs between two indented configurations (e.g., YAML, INI, or any indented text). Version 1.4.0, last updated in 2025. Release cadence is irregular (major versions every few months). It supports Python >=3.8 and is designed to produce structured diff output highlighting additions, deletions, and context.","status":"active","version":"1.4.0","language":"python","source_language":"en","source_url":"https://github.com/angely-dev/diffplus","tags":["diff","indented","configuration","text","incremental"],"install":[{"cmd":"pip install diffplus","lang":"bash","label":""}],"dependencies":[],"imports":[{"wrong":"from diffplus import diff_texts","symbol":"IncrementalDiff","correct":"from diffplus import IncrementalDiff"},{"wrong":"from diffplus import diff_texts","symbol":"incremental_diff","correct":"from diffplus import incremental_diff"}],"quickstart":{"code":"from diffplus import diff_texts\n\ntext_a = \"\"\"\nparent:\n  child1: value1\n  child2: value2\n\"\"\"\n\ntext_b = \"\"\"\nparent:\n  child1: modified_value1\n  child3: value3\n\"\"\"\n\ndiff_result = diff_texts(text_a, text_b, context_lines=2)\nprint(diff_result)\n# Optional: access structured changes\nfor change in diff_result.changes:\n    print(change.line, change.type)","lang":"python","description":"Basic usage: diff two indented text strings and print the result."},"warnings":[{"fix":"Preprocess inputs to replace tabs with spaces before calling diff_texts.","message":"The library assumes input text has consistent indentation (spaces only). Mixing tabs and spaces may produce incorrect diffs.","severity":"gotcha","affected_versions":"all"},{"fix":"Explicitly set context_lines for your use case, e.g., diff_texts(..., context_lines=1).","message":"The 'context_lines' parameter can cause unexpected output if set too high. Default is 3; for large files, consider reducing to 1 or 0.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'from diffplus import diff_texts' instead of 'from diffplus import diff_indented'.","message":"Function 'diff_indented' has been renamed to 'diff_texts' in v1.0.0.","severity":"deprecated","affected_versions":"<1.0.0"}],"env_vars":null,"search_vec":"'1.4.0':25 '2025':29 '3.8':42 'addit':52 'cadenc':31 'comput':8 'configur':16,58 'context':55 'contextu':11 'delet':53 'design':45 'diff':12,49,56 'diffplus':1,2 'e.g':17 'everi':36 'highlight':51 'increment':9,60 'indent':15,22,57 'ini':19 'irregular':33 'last':26 'librari':6 'major':34 'month':38 'output':50 'produc':47 'python':5,41 'releas':30 'structur':48 'support':40 'text':23,59 'two':14 'updat':27 'version':24,35 'yaml':18","created_at":"2026-05-09T05:51:35.277073+00:00","updated_at":"2026-05-09T05:51:35.277073+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/angely-dev/diffplus","docs":null,"changelog":null,"pypi":"https://pypi.org/project/diffplus/","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-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}