{
  "id": "task_libraries:diff/python",
  "path": "/exapedia/python-diff-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "Python diff libraries",
  "answer": [
    {
      "t": "text",
      "text": "Python diff libraries compare two strings, documents, or data structures and describe what changed between them. A structural diff reports each change by its path inside nested data rather than as inserted and deleted characters. These libraries let apps and AI agents show what changed between two versions of a record or document."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "Python diff libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#rapidfuzz",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F128"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F129"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F137"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F132"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F130"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#jsonpatch",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F147"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F148"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F149"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#deepdiff",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F164"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F171"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F168"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F166"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#levenshtein",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F177"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F181"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#jsondiff",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F197"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F201"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F199"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#diff-match-patch",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F217"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F218"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F226"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F221"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F219"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#dictdiffer",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F237"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F241"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F239"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#xmldiff",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F254"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F255"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F263"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F258"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F256"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "PyPI"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#jsonpatch",
          "label": [
            {
              "t": "text",
              "text": "JSON Patch"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads among the dedicated diff libraries in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F148"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "JSON object diff",
            "Patch without target"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#rapidfuzz",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F128"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F138"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F139"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#jsonpatch",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F147"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F155"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F156"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#deepdiff",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F164"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#levenshtein",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F177"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F187"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#jsondiff",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F197"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F207"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F208"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#diff-match-patch",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F217"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F227"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F228"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#dictdiffer",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F237"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F245"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F246"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#xmldiff",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F254"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F264"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F265"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "rapidfuzz",
          "name": [
            {
              "t": "fact",
              "fact": "F128"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/rapidfuzz/RapidFuzz"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/rapidfuzz"
            },
            {
              "label": "Docs",
              "href": "https://rapidfuzz.github.io/RapidFuzz/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F135"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F129"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F137"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F131"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F130"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://rapidfuzz.github.io/RapidFuzz/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F128"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F145"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/daymade/claude-code-skills",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F145"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def extract_changes(self, original: str, corrected: str) -> List[ExtractedChange]:\n    \"\"\"\n    Extract all from→to changes between original and corrected text\n\n    Args:\n        original: Original text (before correction)\n        corrected: Corrected text (after AI processing)\n\n    Returns:\n        List of ExtractedChange objects with context and confidence\n\n    Raises:\n        InputValidationError: If input validation fails\n\n    CRITICAL FIX (P1-2): Comprehensive input validation to prevent:\n    - DoS attacks from oversized input\n    - Crashes from None/invalid input\n    - Performance issues from malicious input\n    \"\"\"\n    # CRITICAL FIX: Validate input types\n    if not isinstance(original, str):\n        raise InputValidationError(\n            f\"original must be str, got {type(original).__name__}\"\n        )\n\n    if not isinstance(corrected, str):\n        raise InputValidationError(\n            f\"corrected must be str, got {type(corrected).__name__}\"\n        )\n\n    # CRITICAL FIX: Validate input length (DoS prevention)\n    if len(original) > MAX_TEXT_LENGTH:\n        raise InputValidationError(\n            f\"original text too long ({len(original)} chars). \"\n            f\"Maximum allowed: {MAX_TEXT_LENGTH}\"\n        )\n\n    if len(corrected) > MAX_TEXT_LENGTH:\n        raise InputValidationError(\n            f\"corrected text too long ({len(corrected)} chars). \"\n            f\"Maximum allowed: {MAX_TEXT_LENGTH}\"\n        )\n\n    # CRITICAL FIX: Handle empty strings gracefully\n    if not original and not corrected:\n        logger.debug(\"Both texts are empty, returning empty changes list\")\n        return []\n\n    # CRITICAL FIX: Validate text contains valid characters (not binary data)\n    try:\n        # Try to encode/decode to ensure valid text\n        original.encode('utf-8')\n        corrected.encode('utf-8')\n    except UnicodeError as e:\n        raise InputValidationError(f\"Invalid text encoding: {e}\") from e\n\n    logger.debug(\n        f\"Extracting changes: original={len(original)} chars, \"\n        f\"corrected={len(corrected)} chars\"\n    )\n\n    original_tokens = self._tokenize(original)\n    corrected_tokens = self._tokenize(corrected)\n    opcodes = self._coalesce_opcodes(Levenshtein.opcodes(\n        [token for token, _start, _end in original_tokens],\n        [token for token, _start, _end in corrected_tokens],\n    ).as_list())\n    changes = []\n    seen: set[tuple[int, str, str]] = set()\n\n    for tag, i1, i2, j1, j2 in opcodes:\n        if tag != 'equal':\n            original_start, original_end = self._token_span(\n                original_tokens, i1, i2, len(original)\n            )\n            corrected_start, corrected_end = self._token_span(\n                corrected_tokens, j1, j2, len(corrected)\n            )\n\n            learnable = tag == 'replace'\n            if tag == 'insert':\n                (\n                    original_start,\n                    original_end,\n                    corrected_start,\n                    corrected_end,\n                    learnable,\n                ) = self._anchor_insert(\n                    original_tokens,\n                    corrected_tokens,\n                    i1,\n                    j1,\n                    j2,\n                    original_start,\n                    original_end,\n                    corrected_start,\n                    corrected_end,\n                )\n            elif tag == 'delete':\n                (\n                    original_start,\n                    original_end,\n                    corrected_start,\n                    corrected_end,\n                    learnable,\n                ) = self._anchor_delete(\n                    original_tokens,\n                    corrected_tokens,\n                    i1,\n                    i2,\n                    j1,\n                    original_start,\n                    original_end,\n                    corrected_start,\n                    corrected_end,\n                )\n\n            from_text = original[original_start:original_end]\n            to_text = corrected[corrected_start:corrected_end]\n\n            if not self._is_material_change(from_text, to_text):\n                continue\n            learnable_length = self._is_learnable_change_length(\n                from_text, to_text\n            )\n\n            formatting_only = self._is_formatting_only(from_text, to_text)\n\n            # Extract context\n            context_before = original[max(0, original_start-20):original_start]\n            context_after = original[\n                original_end:min(len(original), original_end+20)\n            ]\n\n            # Classify change type\n            change_type = self._classify_change(\n                tag, from_text, to_text, formatting_only=formatting_only\n            )\n\n            # Calculate confidence (based on text similarity and context)\n            confidence = self._calculate_confidence(\n                from_text, to_text, context_before, context_after\n            )\n\n            # Keep the exact bytes of an unexpected whitespace/case edit in\n            # history. Ordinary lexical changes still shed boundary space\n            # so their replayable dictionary pair is not indentation-bound.\n            clean_from = from_text if formatting_only else from_text.strip()\n            clean_to = to_text if formatting_only else to_text.strip()\n            key = (original_start, clean_from, clean_to)\n            if key in seen:\n                continue\n            seen.add(key)\n\n            changes.append(ExtractedChange(\n                from_text=clean_from,\n                to_text=clean_to,\n                context_before=context_before,\n                context_after=context_after,\n                position=original_start,\n                change_type=change_type,\n                confidence=confidence,\n                learnable=(\n                    learnable\n                    and learnable_length\n                    and not formatting_only\n                    and bool(clean_from)\n                    and bool(clean_to)\n                    and self._contains_lexical_text(clean_from)\n                    and self._contains_lexical_text(clean_to)\n                ),\n            ))\n\n            # CRITICAL FIX: Prevent DoS from excessive changes\n            if len(changes) > MAX_CHANGES:\n                raise InputValidationError(\n                    \"Correction produced more than \"\n                    f\"{MAX_CHANGES} auditable changes; refusing to truncate \"\n                    \"history for modified text\"\n                )\n\n    logger.debug(f\"Extracted {len(changes)} changes\")\n    return changes\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/daymade/claude-code-skills/blob/2393e2e5a82e441c578928bfb10fd9b37b553d18/daymade-audio/transcript-fixer/scripts/core/change_extractor.py#L133-L315",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F144"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=rapidfuzz%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F128"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from rapidfuzz.distance import Levenshtein\n\nprint(Levenshtein.editops(\"spam\", \"park\"))\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://rapidfuzz.github.io/RapidFuzz/Usage/distance/Levenshtein.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "Levenshtein.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F133"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "jsonpatch",
          "name": [
            {
              "t": "fact",
              "fact": "F147"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/stefankoegl/python-json-patch"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/jsonpatch"
            },
            {
              "label": "Docs",
              "href": "https://python-json-patch.readthedocs.io/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F11"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F148"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F150"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F149"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://python-json-patch.readthedocs.io/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F147"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F12"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F13"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/langchain-ai/langchain",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F162"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def __add__(self, other: RunLogPatch | Any) -> RunLog:\n    \"\"\"Combine two `RunLogPatch` instances.\n\n    Args:\n        other: The other `RunLogPatch` to combine with.\n\n    Raises:\n        TypeError: If the other object is not a `RunLogPatch`.\n\n    Returns:\n        A new `RunLog` representing the combination of the two.\n    \"\"\"\n    if type(other) is RunLogPatch:\n        ops = self.ops + other.ops\n        state = jsonpatch.apply_patch(None, copy.deepcopy(ops))\n        return RunLog(*ops, state=state)\n\n    msg = f\"unsupported operand type(s) for +: '{type(self)}' and '{type(other)}'\"\n    raise TypeError(msg)\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/langchain-ai/langchain/blob/92c7defb0ac54ca2be18fca1bcf89cc88d9356c6/libs/core/langchain_core/tracers/log_stream.py#L137-L155",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F161"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20jsonpatch%20for%20differences%2C%20reconciliation%20and%20patch%20application&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F147"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import jsonpatch\n\nsource = {\"name\": \"old\"}\npatch = jsonpatch.make_patch(source, {\"name\": \"new\"})\nprint(patch.patch)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://python-json-patch.readthedocs.io/en/latest/tutorial.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "tutorial.rst"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F152"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "deepdiff",
          "name": [
            {
              "t": "fact",
              "fact": "F164"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/qlustered/deepdiff"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/deepdiff"
            },
            {
              "label": "Docs",
              "href": "https://zepworks.com/deepdiff/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F37"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F171"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F166"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://zepworks.com/deepdiff/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F164"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F38"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F43"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F44"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F45"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from deepdiff import DeepDiff\n\nprint(DeepDiff({\"name\": \"old\"}, {\"name\": \"new\"}))\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://zepworks.com/deepdiff/current/diff.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "basics.html"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20deepdiff%20for%20differences%2C%20reconciliation%20and%20patch%20application&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F164"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F169"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "levenshtein",
          "name": [
            {
              "t": "fact",
              "fact": "F177"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/rapidfuzz/Levenshtein"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/Levenshtein"
            },
            {
              "label": "Docs",
              "href": "https://rapidfuzz.github.io/Levenshtein/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F184"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://rapidfuzz.github.io/Levenshtein/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F177"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F196"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/ai-forever/sage",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F195"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def get_levenshtein_mask(source, correct, error2idx):\n    mask = [[0] for _ in range(len(correct))]\n    changes = Levenshtein.editops(correct, source)\n    changes_letters = []\n    for change in changes:\n        if change[0] == 'delete' or change[0] == 'replace':\n            changes_letters.append((change[0], change[1], change[2], correct[change[1]]))\n        else:\n            changes_letters.append((change[0], change[1], change[2], source[change[2]]))\n    swap_changes = []\n    i = 0\n    while i < len(changes_letters) - 1:\n        change_1 = changes_letters[i]\n        change_2 = changes_letters[i + 1]\n        if change_1[0] == 'insert' and change_2[0] == 'delete' and change_1[3] == change_2[3] and change_2[1] - \\\n                change_1[1] == 1:\n            swap_changes.append(('swap', change_1[1], change_1[2], change_1[3]))\n            swap_changes.append(('swap', change_2[1], change_1[2] + 1, change_2[3]))\n            i += 2\n        else:\n            swap_changes.append(change_1)\n            i += 1\n    if i == len(changes_letters) - 1:\n        swap_changes.append(changes_letters[i])\n\n    for change in swap_changes:\n        if change[0] == 'delete':\n            mask[change[1]][0] = -1\n        elif change[0] == 'replace':\n            mask[change[1]][0] = error2idx['replace']\n        elif change[0] == 'insert':\n            mask[change[1] - 1].append(error2idx['add'])\n        elif change[0] == 'swap':\n            mask[change[1]][0] = error2idx['swap']\n    new_mask = []\n    for m in mask:\n        new_mask.extend(m)\n\n    return new_mask\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/ai-forever/sage/blob/b535e48dea44279a31356eee61fdb7309d9bd8fb/sage/spelling_correction/training/data_utils.py#L6-L44",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F194"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Levenshtein%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F177"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from Levenshtein import editops\n\nprint(editops(\"spam\", \"park\"))\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://rapidfuzz.github.io/Levenshtein/levenshtein.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "levenshtein.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F182"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "jsondiff",
          "name": [
            {
              "t": "fact",
              "fact": "F197"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/xlwings/jsondiff"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/jsondiff"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F204"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F200"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F199"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/xlwings/jsondiff",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F197"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F216"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/meta/openr",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F215"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "async def _run(self, client: OpenrCtrlCppClient.Async, file: str, *args, **kwargs):\n    running_conf = await client.getRunningConfig()\n\n    try:\n        file_conf = await client.dryrunConfig(file)\n    except OpenrError as ex:\n        click.echo(click.style(f\"FAILED: {ex}\", fg=\"red\"))\n        return\n\n    res = jsondiff.diff(running_conf, file_conf, load=True, syntax=\"explicit\")\n    if res:\n        click.echo(click.style(\"DIFF FOUND!\", fg=\"red\"))\n        print(f\"== diff(running_conf, {file}) ==\")\n        print(res)\n    else:\n        click.echo(click.style(\"SAME\", fg=\"green\"))\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/meta/openr/blob/c2a4bbba958d9d5892bd8d6d3e9cd712a0abe000/openr/py/openr/cli/commands/config.py#L48-L63",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F214"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=jsondiff%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F197"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import jsondiff\n\nprint(jsondiff.diff({\"name\": \"old\"}, {\"name\": \"new\"}))\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/xlwings/jsondiff/blob/master/jsondiff/__init__.py",
                  "label": [
                    {
                      "t": "text",
                      "text": "__init__.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F202"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "diff-match-patch",
          "name": [
            {
              "t": "fact",
              "fact": "F217"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/diff-match-patch-python/diff-match-patch"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/diff-match-patch"
            },
            {
              "label": "Docs",
              "href": "https://pypi.org/project/diff-match-patch/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F224"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F218"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F226"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F220"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F219"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pypi.org/project/diff-match-patch/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F217"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F236"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/Aider-AI/aider",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F235"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def map_patches(texts, patches, debug):\n    search_text, replace_text, original_text = texts\n\n    dmp = diff_match_patch()\n    dmp.Diff_Timeout = 5\n\n    diff_s_o = dmp.diff_main(search_text, original_text)\n    # diff_r_s = dmp.diff_main(replace_text, search_text)\n\n    # dmp.diff_cleanupSemantic(diff_s_o)\n    # dmp.diff_cleanupEfficiency(diff_s_o)\n\n    if debug:\n        html = dmp.diff_prettyHtml(diff_s_o)\n        Path(\"tmp.html\").write_text(html)\n\n        dump(len(search_text))\n        dump(len(original_text))\n\n    for patch in patches:\n        start1 = patch.start1\n        start2 = patch.start2\n\n        patch.start1 = dmp.diff_xIndex(diff_s_o, start1)\n        patch.start2 = dmp.diff_xIndex(diff_s_o, start2)\n\n        if debug:\n            print()\n            print(start1, repr(search_text[start1 : start1 + 50]))\n            print(patch.start1, repr(original_text[patch.start1 : patch.start1 + 50]))\n            print(patch.diffs)\n            print()\n\n    return patches\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/Aider-AI/aider/blob/5dc9490bb35f9729ef2c95d00a19ccd30c26339c/aider/coders/search_replace.py#L193-L226",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F234"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=diff-match-patch%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F217"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from diff_match_patch import diff_match_patch\n\ndmp = diff_match_patch()\nprint(dmp.diff_main(\"spam\", \"park\"))\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/diff-match-patch-python/diff-match-patch/blob/main/diff_match_patch/diff_match_patch.py",
                  "label": [
                    {
                      "t": "text",
                      "text": "diff_match_patch.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F222"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "dictdiffer",
          "name": [
            {
              "t": "fact",
              "fact": "F237"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/inveniosoftware/dictdiffer"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/dictdiffer"
            },
            {
              "label": "Docs",
              "href": "https://dictdiffer.rtfd.io/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F62"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F240"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F239"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://dictdiffer.rtfd.io/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F237"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F63"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F64"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F65"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F66"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F67"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F68"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F252"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F253"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/tortoise/aerich",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F252"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def get_dict_diff_by_key(\n    old_fields: list[dict],\n    new_fields: list[dict],\n    key: str = \"through\",\n    second_key: str = \"forward_key\",\n) -> Generator[tuple[str, Any, Any]]:\n    \"\"\"\n    Compare two list by key instead of by index\n\n    :param old_fields: previous field info list\n    :param new_fields: current field info list\n    :param key: if two dicts have the same value of this key, action is change; otherwise, is remove/add\n    :param second_key: if multi fields with same value of key, use `(field[key], field[second_key])` as ident\n    :return: similar to dictdiffer.diff\n\n    Example::\n\n        >>> old = [{'through': 'a'}, {'through': 'b'}, {'through': 'c'}]\n        >>> new = [{'through': 'a'}, {'through': 'c'}]  # remove the second element\n        >>> list(diff(old, new))\n        [('change', [1, 'through'], ('b', 'c')),\n         ('remove', '', [(2, {'through': 'c'})])]\n        >>> list(get_dict_diff_by_key(old, new))\n        [('remove', '', [(0, {'through': 'b'})])]\n\n    \"\"\"\n    length_old, length_new = len(old_fields), len(new_fields)\n    if length_old == 0 or length_new == 0:\n        yield from diff(old_fields, new_fields)\n    elif length_old == length_new == 1:\n        yield from _get_field_diffs(old_fields[0], new_fields[0])\n    else:\n        should_use_second_key = len({i[key] for i in old_fields}) < length_old or (\n            len({i[key] for i in new_fields}) < length_new\n        )\n        value_index: dict[str | tuple[str, str], int] = (\n            {(f[key], f[second_key]): i for i, f in enumerate(new_fields)}\n            if should_use_second_key\n            else {f[key]: i for i, f in enumerate(new_fields)}\n        )\n        additions = set(range(length_new))\n        for field in old_fields:\n            value = (field[key], field[second_key]) if should_use_second_key else field[key]\n            if (index := value_index.get(value)) is not None:\n                additions.remove(index)\n                yield from _get_field_diffs(field, new_fields[index])  # change\n            else:\n                yield from diff([field], [])  # remove\n        if additions:\n            for index in sorted(additions):\n                yield from diff([], [new_fields[index]])  # add\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/tortoise/aerich/blob/a4b8186d77c380b67d443bf3b84732b810b3d2bb/aerich/utils.py#L294-L344",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F251"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20dictdiffer%20for%20differences%2C%20reconciliation%20and%20patch%20application&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F237"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from dictdiffer import diff\n\nprint(list(diff({\"name\": \"old\"}, {\"name\": \"new\"})))\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://dictdiffer.readthedocs.io/en/stable/",
                  "label": [
                    {
                      "t": "text",
                      "text": "index.rst"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F242"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "xmldiff",
          "name": [
            {
              "t": "fact",
              "fact": "F254"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/Shoobx/xmldiff"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/xmldiff"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F261"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F255"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F263"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F257"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F256"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/Shoobx/xmldiff",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F254"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F271"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F272"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/AshleyYakeley/NixVirt",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F271"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def define(self):\n    if self.specDefXML is not None:\n        if self.subject is not None:\n            oldDefETree = self.subject.descriptionETree()\n            foundName = oldDefETree.find(\"name\").text\n            if foundName != self.specName:\n                self.subject.undefine()\n            self.oc._cleanDefETree(self.specDefXML,oldDefETree)\n            self.vreport(\"redefine\")\n            newvobject = self.oc._fromXML(self.specDefXML)\n            match self.restart:\n                case True:\n                    self.vreport(\"always restart\")\n                    self.subject._deactivate()\n                case False:\n                    self.vreport(\"never restart\")\n                case None:\n                    self.vreport(\"detect restart\")\n                    newDefETree = newvobject.descriptionETree()\n                    self.oc._cleanDefETree(self.specDefXML,newDefETree)\n                    diff = xmldiff.main.diff_trees(oldDefETree,newDefETree)\n                    if len(diff) > 0:\n                        if self.oc.session.verbose:\n                            difftext = xmldiff.main.diff_trees(oldDefETree,newDefETree,formatter=xmldiff.formatting.DiffFormatter())\n                            self.vreport(\"changed:\\n\" + difftext)\n                        self.subject._deactivate()\n                    else:\n                        self.vreport(\"unchanged\")\n            self.subject = newvobject\n        else:\n            self.vreport(\"define new\")\n            self.subject = self.oc._fromXML(self.specDefXML)\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/AshleyYakeley/NixVirt/blob/b9489f0e4b1cef1d5fe5dcc48f705c1cdfc9e7a8/tool/nixvirt.py#L371-L402",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F270"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=xmldiff%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F254"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from xmldiff import main\n\nprint(main.diff_texts(\"<root/>\", \"<root><item/></root>\"))\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://xmldiff.readthedocs.io/en/stable/api.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "api.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F259"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which Python diff library should I use?",
      "a": [
        {
          "t": "link",
          "href": "#deepdiff",
          "label": [
            {
              "t": "text",
              "text": "DeepDiff"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits nested Python objects and JSON-like data. "
        },
        {
          "t": "link",
          "href": "#jsonpatch",
          "label": [
            {
              "t": "text",
              "text": "JSON Patch"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits changes that other systems must apply as standard JSON Patch operations. "
        },
        {
          "t": "link",
          "href": "#diff-match-patch",
          "label": [
            {
              "t": "text",
              "text": "Diff Match Patch"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits plain text with patches that tolerate shifted context."
        }
      ]
    },
    {
      "q": "What is DeepDiff?",
      "a": [
        {
          "t": "link",
          "href": "#deepdiff",
          "label": [
            {
              "t": "text",
              "text": "DeepDiff"
            }
          ]
        },
        {
          "t": "text",
          "text": " finds deep differences between Python objects and reports them by path. Its Delta interface stores those changes and replays them against the original data."
        }
      ]
    },
    {
      "q": "How do I diff two strings in Python?",
      "a": [
        {
          "t": "text",
          "text": "The built-in difflib module compares two sequences of lines or characters. "
        },
        {
          "t": "link",
          "href": "#diff-match-patch",
          "label": [
            {
              "t": "text",
              "text": "Diff Match Patch"
            }
          ]
        },
        {
          "t": "text",
          "text": " adds patch objects that apply to text with surrounding context, and "
        },
        {
          "t": "link",
          "href": "#levenshtein",
          "label": [
            {
              "t": "text",
              "text": "Levenshtein"
            }
          ]
        },
        {
          "t": "text",
          "text": " computes edit distances and edit operations."
        }
      ]
    },
    {
      "q": "What is xmldiff?",
      "a": [
        {
          "t": "link",
          "href": "#xmldiff",
          "label": [
            {
              "t": "text",
              "text": "xmldiff"
            }
          ]
        },
        {
          "t": "text",
          "text": " compares parsed XML trees and returns semantic edit actions. Those actions apply to the original XML as a patch script."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, jsonpatch",
      "display": "jsonpatch",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, jsonpatch",
      "display": "129.6M",
      "asOf": "2026-11-16"
    },
    "F3": {
      "label": "License, jsonpatch",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, jsonpatch",
      "display": "1.47, Nov 2026",
      "asOf": "2026-11-11"
    },
    "F5": {
      "label": "Package release date, jsonpatch",
      "display": "Nov 2026",
      "asOf": "2026-11-11"
    },
    "F6": {
      "label": "Repository stars, jsonpatch",
      "display": "500",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Nested objects, jsonpatch",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Applies patches, jsonpatch",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Output formats, jsonpatch",
      "display": "JSON",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Install, jsonpatch",
      "display": "pip install jsonpatch",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "What it does, jsonpatch",
      "display": "Creates and applies JSON Patch operation sequences between JSON documents.",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "strengths lead, jsonpatch",
      "display": "Creates patches from document differences",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths, jsonpatch",
      "display": "Use make_patch to turn a source document into its destination.",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths lead, jsonpatch",
      "display": "Can check values before replacement",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths, jsonpatch",
      "display": "Enable generate_test_ops to detect changed values before applying a patch.",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "limitations lead, jsonpatch",
      "display": "Patch paths depend on source",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations, jsonpatch",
      "display": "Apply generated operations to the source document they were created from.",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations lead, jsonpatch",
      "display": "In-place operations change the input",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations, jsonpatch",
      "display": "Keep the default copy when the original document must remain unchanged.",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "Quickstart, jsonpatch",
      "display": "import jsonpatch\npatch = jsonpatch.JsonPatch([\n    {'op': 'add', 'path': '/foo', 'value': 'bar'},\n    {'op': 'add', 'path': '/baz', 'value': [1, 2, 3]},\n    {'op': 'remove', 'path': '/baz/1'},\n    {'op': 'test', 'path': '/baz', 'value': [1, 3]},\n    {'op': 'replace', 'path': '/baz/0', 'value': 42},\n    {'op': 'remove', 'path': '/baz/1'},\n])\npatch = jsonpatch.JsonPatch.from_string('''[\n    {\"op\": \"add\", \"path\": \"/foo\", \"value\": \"bar\"},\n    {\"op\": \"add\", \"path\": \"/baz\", \"value\": [1, 2, 3]},\n    {\"op\": \"remove\", \"path\": \"/baz/1\"},\n    {\"op\": \"test\", \"path\": \"/baz\", \"value\": [1, 3]},\n    {\"op\": \"replace\", \"path\": \"/baz/0\", \"value\": 42},\n    {\"op\": \"remove\", \"path\": \"/baz/1\"}\n]''')\npatch.apply({})\n\nsrc = {'foo': 'bar', 'numbers': [1, 3, 4, 8]}\ndst = {'baz': 'qux', 'numbers': [1, 4, 7]}\npatch = jsonpatch.JsonPatch.from_diff(src, dst)\npatch = jsonpatch.make_patch(src, dst)\n\nresult = patch.apply(src)\nresult == dst\n",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Project function, jsonpatch",
      "display": "def __add__(self, other: RunLogPatch | Any) -> RunLog:\n    \"\"\"Combine two `RunLogPatch` instances.\n\n    Args:\n        other: The other `RunLogPatch` to combine with.\n\n    Raises:\n        TypeError: If the other object is not a `RunLogPatch`.\n\n    Returns:\n        A new `RunLog` representing the combination of the two.\n    \"\"\"\n    if type(other) is RunLogPatch:\n        ops = self.ops + other.ops\n        state = jsonpatch.apply_patch(None, copy.deepcopy(ops))\n        return RunLog(*ops, state=state)\n\n    msg = f\"unsupported operand type(s) for +: '{type(self)}' and '{type(other)}'\"\n    raise TypeError(msg)\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project function reference, jsonpatch",
      "display": "log_stream.py · __add__()",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project repository, jsonpatch",
      "display": "langchain-ai/langchain",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project stars, langchain-ai/langchain",
      "display": "149.7K",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project push date, langchain-ai/langchain",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F26": {
      "label": "Library name, deepdiff",
      "display": "DeepDiff",
      "asOf": "2026-11-17"
    },
    "F27": {
      "label": "Monthly downloads, deepdiff",
      "display": "59.9M",
      "asOf": "2026-11-16"
    },
    "F28": {
      "label": "License, deepdiff",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F29": {
      "label": "Package release, deepdiff",
      "display": "9.1.0, May 2026",
      "asOf": "2026-05-15"
    },
    "F30": {
      "label": "Package release date, deepdiff",
      "display": "May 2026",
      "asOf": "2026-05-15"
    },
    "F31": {
      "label": "Repository stars, deepdiff",
      "display": "2.5K",
      "asOf": "2026-11-17"
    },
    "F32": {
      "label": "Nested objects, deepdiff",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Numeric tolerance, deepdiff",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Applies patches, deepdiff",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Output formats, deepdiff",
      "display": "JSON",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "Install, deepdiff",
      "display": "pip install deepdiff",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "What it does, deepdiff",
      "display": "Finds deep differences between Python objects and can create structured-data deltas.",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "strengths lead, deepdiff",
      "display": "Compares nested Python objects",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths, deepdiff",
      "display": "Report changes inside dictionaries, lists, and custom objects.",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths lead, deepdiff",
      "display": "Can ignore iterable ordering",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "strengths, deepdiff",
      "display": "Use ignore_order when list position should not determine matching.",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "limitations lead, deepdiff",
      "display": "Ignoring order hides duplicate changes",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations, deepdiff",
      "display": "Enable report_repetition when repeated-item counts must be compared.",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "limitations lead, deepdiff",
      "display": "Custom objects need JSON mappings",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "limitations, deepdiff",
      "display": "Provide a conversion mapping for types the serializer cannot encode.",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "Quickstart, deepdiff",
      "display": "from deepdiff import DeepDiff\nt1 = [\n    {'id': 'AA', 'name': 'Joe', 'last_name': 'Nobody'},\n    {'id': 'BB', 'name': 'James', 'last_name': 'Blue'},\n    {'id': 'CC', 'name': 'Mike', 'last_name': 'Apple'},\n]\nt2 = [\n    {'id': 'AA', 'name': 'Joe', 'last_name': 'Nobody'},\n    {'id': 'BB', 'name': 'James', 'last_name': 'Brown'},\n    {'id': 'CC', 'name': 'Mike', 'last_name': 'Apple'},\n]\nDeepDiff(t1, t2)\n",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Project function, deepdiff",
      "display": "def _get_json_compliance(obj):\n    \"\"\"This function performs the actual compliance for json serializable data.\"\"\"\n\n    def _normalize_diff(diff, path_to_diff):\n        \"\"\"Normalizes the diff to a list of keys and list indexes that have changed.\"\"\"\n        dictionary_items = list(diff.get(f\"dictionary_item_{path_to_diff}\", []))\n        list_items = list(diff.get(f\"iterable_item_{path_to_diff}\", {}).keys())\n        values_changed = list(diff.get(\"values_changed\", {}).keys())\n        type_changes = list(diff.get(\"type_changes\", {}).keys())\n        return dictionary_items + list_items + values_changed + type_changes\n\n    diff = DeepDiff(\n        obj.actual, obj.intended, ignore_order=obj.ordered, report_repetition=True, threshold_to_diff_deeper=0\n    )\n    if not diff:\n        compliance_int = 1\n        compliance = True\n        ordered = True\n        missing = \"\"\n        extra = \"\"\n    else:\n        compliance_int = 0\n        compliance = False\n        ordered = False\n        missing = _null_to_empty(_normalize_diff(diff, \"added\"))\n        extra = _null_to_empty(_normalize_diff(diff, \"removed\"))\n\n    return {\n        \"compliance\": compliance,\n        \"compliance_int\": compliance_int,\n        \"ordered\": ordered,\n        \"missing\": missing,\n        \"extra\": extra,\n    }\n",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project function reference, deepdiff",
      "display": "models.py · _get_json_compliance()",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project repository, deepdiff",
      "display": "nautobot/nautobot-app-golden-config",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Project stars, nautobot/nautobot-app-golden-config",
      "display": "128",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Project push date, nautobot/nautobot-app-golden-config",
      "display": "Nov 2026",
      "asOf": "2026-11-13"
    },
    "F52": {
      "label": "Library name, dictdiffer",
      "display": "Dictdiffer",
      "asOf": "2026-11-17"
    },
    "F53": {
      "label": "Monthly downloads, dictdiffer",
      "display": "5.4M",
      "asOf": "2026-11-16"
    },
    "F54": {
      "label": "License, dictdiffer",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F55": {
      "label": "Package release, dictdiffer",
      "display": "0.10.0, Jul 2026",
      "asOf": "2026-07-16"
    },
    "F56": {
      "label": "Package release date, dictdiffer",
      "display": "Jul 2026",
      "asOf": "2026-07-16"
    },
    "F57": {
      "label": "Repository stars, dictdiffer",
      "display": "849",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "Nested objects, dictdiffer",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Numeric tolerance, dictdiffer",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Applies patches, dictdiffer",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "Install, dictdiffer",
      "display": "pip install dictdiffer",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "What it does, dictdiffer",
      "display": "Compares dictionary, list, and set structures and applies their change operations.",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "strengths lead, dictdiffer",
      "display": "Diffs and patches dictionary structures",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "strengths, dictdiffer",
      "display": "Apply returned change operations with patch or reverse them with revert.",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths lead, dictdiffer",
      "display": "Supports numeric comparison tolerance",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "strengths, dictdiffer",
      "display": "Treat close numeric values as equal using a tolerance.",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "limitations lead, dictdiffer",
      "display": "Patching copies the destination",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "limitations, dictdiffer",
      "display": "Set in_place to modify the original destination instead.",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "Quickstart, dictdiffer",
      "display": "from dictdiffer import diff, patch, swap, revert\n\nfirst = {\n    \"title\": \"hello\",\n    \"fork_count\": 20,\n    \"stargazers\": [\"/users/20\", \"/users/30\"],\n    \"settings\": {\n        \"assignees\": [100, 101, 201],\n    }\n}\n\nsecond = {\n    \"title\": \"hellooo\",\n    \"fork_count\": 20,\n    \"stargazers\": [\"/users/20\", \"/users/30\", \"/users/40\"],\n    \"settings\": {\n        \"assignees\": [100, 101, 202],\n    }\n}\n\nresult = diff(first, second)\n\nassert list(result) == [\n    ('change', ['settings', 'assignees', 2], (201, 202)),\n    ('add', 'stargazers', [(2, '/users/40')]),\n    ('change', 'title', ('hello', 'hellooo'))]\n\nresult = diff(first, second)\npatched = patch(result, first)\n\nassert patched == second\n\nresult = diff(first, second)\nswapped = swap(result)\n\nassert list(swapped) == [\n    ('change', ['settings', 'assignees', 2], (202, 201)),\n    ('remove', 'stargazers', [(2, '/users/40')]),\n    ('change', 'title', ('hellooo', 'hello'))]\n\nresult = diff(first, second)\nreverted = revert(result, patched)\nassert reverted == first\n",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "Library name, difflib",
      "display": "difflib",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "Monthly downloads, difflib",
      "display": "Standard library",
      "asOf": "2026-11-16"
    },
    "F72": {
      "label": "License, difflib",
      "display": "PSF License Version 2",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Package release, difflib",
      "display": "With Python",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Undated package release, difflib",
      "display": "With Python",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "Repository context, difflib",
      "display": "Part of Python",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "Applies patches, difflib",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F77": {
      "label": "Output formats, difflib",
      "display": "HTML",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "Install, difflib",
      "display": "python -c \"import difflib\"",
      "asOf": "2026-11-17"
    },
    "F79": {
      "label": "What it does, difflib",
      "display": "Compares sequences and produces text or HTML difference reports.",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "strengths lead, difflib",
      "display": "Creates readable text diffs",
      "asOf": "2026-11-17"
    },
    "F81": {
      "label": "strengths, difflib",
      "display": "Generate unified or context diffs between sequences of lines.",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "strengths lead, difflib",
      "display": "Creates side-by-side HTML reports",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "strengths, difflib",
      "display": "Use HtmlDiff for a complete HTML comparison or an embedded table.",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "limitations lead, difflib",
      "display": "Deltas can exceed minimal edits",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "limitations, difflib",
      "display": "Choose another algorithm when the shortest edit sequence is required.",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "limitations lead, difflib",
      "display": "HTML descriptions need escaping",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "limitations, difflib",
      "display": "Escape untrusted fromdesc and todesc values before generating the report.",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "Quickstart, difflib",
      "display": "import sys\nfrom difflib import *\ns1 = ['bacon\\n', 'eggs\\n', 'ham\\n', 'guido\\n']\ns2 = ['python\\n', 'eggy\\n', 'hamster\\n', 'guido\\n']\nsys.stdout.writelines(context_diff(s1, s2, fromfile='before.py',\n                       tofile='after.py'))\n",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "Project function, difflib",
      "display": "def diff(a: str, b: str, a_name: str, b_name: str) -> str:\n    \"\"\"Return a unified diff string between strings `a` and `b`.\"\"\"\n    import difflib\n\n    a_lines = _splitlines_no_ff(a)\n    b_lines = _splitlines_no_ff(b)\n    diff_lines = []\n    for line in difflib.unified_diff(\n        a_lines, b_lines, fromfile=a_name, tofile=b_name, n=5\n    ):\n        # Work around https://bugs.python.org/issue2142\n        # See:\n        # https://www.gnu.org/software/diffutils/manual/html_node/Incomplete-Lines.html\n        if line[-1] == \"\\n\":\n            diff_lines.append(line)\n        else:\n            diff_lines.append(line + \"\\n\")\n            diff_lines.append(\"\\\\ No newline at end of file\\n\")\n    return \"\".join(diff_lines)\n",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "Project function reference, difflib",
      "display": "output.py · diff()",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "Project repository, difflib",
      "display": "psf/black",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "Project stars, psf/black",
      "display": "42.2K",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "Project push date, psf/black",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F94": {
      "label": "Developer need",
      "display": "Readable text comparisons",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "Why choose difflib",
      "display": "unified or context text reports",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "Developer need in introduction",
      "display": "readable text comparisons",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "Developer need",
      "display": "Nested Python object changes",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "Why choose deepdiff",
      "display": "recursive structured-data differences",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Developer need in introduction",
      "display": "nested Python object changes",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "When to consider jsonpatch",
      "display": "the output must be JSON Patch operations",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "Developer need",
      "display": "Dictionary change round trips",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Why choose dictdiffer",
      "display": "diff, patch, and reverse operations",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Developer need in introduction",
      "display": "dictionary change round trips",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "When to consider deepdiff",
      "display": "iterable position should not determine matching",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "Developer need",
      "display": "JSON document update operations",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "Why choose jsonpatch",
      "display": "patches generated from source and destination documents",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Developer need in introduction",
      "display": "JSON document update operations",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "When to consider difflib",
      "display": "readers need a side-by-side HTML text report",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Page introduction",
      "display": "Python diff libraries let developers compare data and produce or apply differences.",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "FAQ: Which Python diff library should I choose?",
      "display": "difflib compares sequences and produces readable difference reports.",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "FAQ: Which Python diff library should I choose?",
      "display": "DeepDiff reports differences inside Python objects.",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "FAQ: Which Python diff library should I choose?",
      "display": "jsonpatch creates document-update operations from source and destination objects.",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "FAQ: Does difflib require a package installation?",
      "display": "It is included in Python’s standard library.",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "FAQ: Does difflib always produce the shortest possible edit sequence?",
      "display": "Differ-generated deltas make no claim to be minimal diffs.",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "FAQ: Can difflib restore a file from any unified diff?",
      "display": "restore extracts a source sequence from a Differ.compare or ndiff delta.",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "FAQ: Do HTML diff descriptions escape untrusted input?",
      "display": "HtmlDiff interprets fromdesc and todesc as unescaped HTML, so callers must escape untrusted descriptions.",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "FAQ: Does DeepDiff ignore list order by default?",
      "display": "By default it compares objects in their iteration order.",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "FAQ: How does DeepDiff report duplicate changes when ignoring order?",
      "display": "Set report_repetition when duplicate counts must appear in the report.",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "FAQ: How does DeepDiff report duplicate changes when ignoring order?",
      "display": "Delta creation with ignored order also requires report_repetition.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: Are DeepDiff numeric settings identical to Dictdiffer tolerance?",
      "display": "DeepDiff significant_digits controls decimal-place comparison unless scientific notation is selected.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "FAQ: Are DeepDiff numeric settings identical to Dictdiffer tolerance?",
      "display": "Dictdiffer tolerance treats sufficiently close numeric values as equal.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "FAQ: Does Dictdiffer patch the original destination?",
      "display": "Its default patch operation copies the destination; in_place changes that behavior.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "FAQ: Can a generated JSON patch be applied to a different document?",
      "display": "A generated patch should be applied to its original source or an equal object.",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "FAQ: Can a generated JSON patch be applied to a different document?",
      "display": "Applying it to another structure can fail because referenced paths are absent.",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "FAQ: Can jsonpatch detect values changed since patch creation?",
      "display": "generate_test_ops inserts value tests before remove and replace operations.",
      "asOf": "2026-11-17"
    },
    "F126": {
      "label": "FAQ: Is a DeepDiff JSON report the same as a Delta?",
      "display": "to_json serializes the report’s text view.",
      "asOf": "2026-11-17"
    },
    "F127": {
      "label": "FAQ: Is a DeepDiff JSON report the same as a Delta?",
      "display": "Delta converts differences into operations that can be stored and applied to structured data.",
      "asOf": "2026-11-17"
    },
    "F128": {
      "label": "Library name, rapidfuzz",
      "display": "RapidFuzz",
      "asOf": "2026-11-20"
    },
    "F129": {
      "label": "Monthly downloads, rapidfuzz",
      "display": "143.8M",
      "asOf": "2026-11-20"
    },
    "F130": {
      "label": "License, rapidfuzz",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F131": {
      "label": "Package release, rapidfuzz",
      "display": "3.14.6",
      "asOf": "2026-11-20"
    },
    "F132": {
      "label": "Package release date, rapidfuzz",
      "display": "Aug 2026",
      "asOf": "2026-11-20"
    },
    "F133": {
      "label": "Install, rapidfuzz",
      "display": "pip install rapidfuzz",
      "asOf": "2026-11-20"
    },
    "F134": {
      "label": "Quickstart, rapidfuzz",
      "display": "from rapidfuzz.distance import Levenshtein\n\nprint(Levenshtein.editops(\"spam\", \"park\"))\n",
      "asOf": "2026-11-20"
    },
    "F135": {
      "label": "Official description, rapidfuzz",
      "display": "Matches strings with fast fuzzy comparison.",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "Quickstart source file, rapidfuzz",
      "display": "Usage/distance/Levenshtein.html",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "Repository stars, rapidfuzz",
      "display": "4.2K",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "JSON object diff, rapidfuzz",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Patch without target, rapidfuzz",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "Input and change model, rapidfuzz",
      "display": "Character or hashable-token alignment with native Editops/Opcodes containers.",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Python prerequisite, rapidfuzz",
      "display": ">=3.11",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Application integration, rapidfuzz",
      "display": "Whole source imports Levenshtein from rapidfuzz.distance, not the separate Levenshtein package. opcodes receives two lists of word-token strings: supported Sequence[Hashable]. Its returned Opcodes.as_list() produces native five-tuples consumed by tag and original/corrected token bounds. Constructor/helper/regex operations are project context, not padded native calls.",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "Project function, rapidfuzz",
      "display": "def extract_changes(self, original: str, corrected: str) -> List[ExtractedChange]:\n    \"\"\"\n    Extract all from→to changes between original and corrected text\n\n    Args:\n        original: Original text (before correction)\n        corrected: Corrected text (after AI processing)\n\n    Returns:\n        List of ExtractedChange objects with context and confidence\n\n    Raises:\n        InputValidationError: If input validation fails\n\n    CRITICAL FIX (P1-2): Comprehensive input validation to prevent:\n    - DoS attacks from oversized input\n    - Crashes from None/invalid input\n    - Performance issues from malicious input\n    \"\"\"\n    # CRITICAL FIX: Validate input types\n    if not isinstance(original, str):\n        raise InputValidationError(\n            f\"original must be str, got {type(original).__name__}\"\n        )\n\n    if not isinstance(corrected, str):\n        raise InputValidationError(\n            f\"corrected must be str, got {type(corrected).__name__}\"\n        )\n\n    # CRITICAL FIX: Validate input length (DoS prevention)\n    if len(original) > MAX_TEXT_LENGTH:\n        raise InputValidationError(\n            f\"original text too long ({len(original)} chars). \"\n            f\"Maximum allowed: {MAX_TEXT_LENGTH}\"\n        )\n\n    if len(corrected) > MAX_TEXT_LENGTH:\n        raise InputValidationError(\n            f\"corrected text too long ({len(corrected)} chars). \"\n            f\"Maximum allowed: {MAX_TEXT_LENGTH}\"\n        )\n\n    # CRITICAL FIX: Handle empty strings gracefully\n    if not original and not corrected:\n        logger.debug(\"Both texts are empty, returning empty changes list\")\n        return []\n\n    # CRITICAL FIX: Validate text contains valid characters (not binary data)\n    try:\n        # Try to encode/decode to ensure valid text\n        original.encode('utf-8')\n        corrected.encode('utf-8')\n    except UnicodeError as e:\n        raise InputValidationError(f\"Invalid text encoding: {e}\") from e\n\n    logger.debug(\n        f\"Extracting changes: original={len(original)} chars, \"\n        f\"corrected={len(corrected)} chars\"\n    )\n\n    original_tokens = self._tokenize(original)\n    corrected_tokens = self._tokenize(corrected)\n    opcodes = self._coalesce_opcodes(Levenshtein.opcodes(\n        [token for token, _start, _end in original_tokens],\n        [token for token, _start, _end in corrected_tokens],\n    ).as_list())\n    changes = []\n    seen: set[tuple[int, str, str]] = set()\n\n    for tag, i1, i2, j1, j2 in opcodes:\n        if tag != 'equal':\n            original_start, original_end = self._token_span(\n                original_tokens, i1, i2, len(original)\n            )\n            corrected_start, corrected_end = self._token_span(\n                corrected_tokens, j1, j2, len(corrected)\n            )\n\n            learnable = tag == 'replace'\n            if tag == 'insert':\n                (\n                    original_start,\n                    original_end,\n                    corrected_start,\n                    corrected_end,\n                    learnable,\n                ) = self._anchor_insert(\n                    original_tokens,\n                    corrected_tokens,\n                    i1,\n                    j1,\n                    j2,\n                    original_start,\n                    original_end,\n                    corrected_start,\n                    corrected_end,\n                )\n            elif tag == 'delete':\n                (\n                    original_start,\n                    original_end,\n                    corrected_start,\n                    corrected_end,\n                    learnable,\n                ) = self._anchor_delete(\n                    original_tokens,\n                    corrected_tokens,\n                    i1,\n                    i2,\n                    j1,\n                    original_start,\n                    original_end,\n                    corrected_start,\n                    corrected_end,\n                )\n\n            from_text = original[original_start:original_end]\n            to_text = corrected[corrected_start:corrected_end]\n\n            if not self._is_material_change(from_text, to_text):\n                continue\n            learnable_length = self._is_learnable_change_length(\n                from_text, to_text\n            )\n\n            formatting_only = self._is_formatting_only(from_text, to_text)\n\n            # Extract context\n            context_before = original[max(0, original_start-20):original_start]\n            context_after = original[\n                original_end:min(len(original), original_end+20)\n            ]\n\n            # Classify change type\n            change_type = self._classify_change(\n                tag, from_text, to_text, formatting_only=formatting_only\n            )\n\n            # Calculate confidence (based on text similarity and context)\n            confidence = self._calculate_confidence(\n                from_text, to_text, context_before, context_after\n            )\n\n            # Keep the exact bytes of an unexpected whitespace/case edit in\n            # history. Ordinary lexical changes still shed boundary space\n            # so their replayable dictionary pair is not indentation-bound.\n            clean_from = from_text if formatting_only else from_text.strip()\n            clean_to = to_text if formatting_only else to_text.strip()\n            key = (original_start, clean_from, clean_to)\n            if key in seen:\n                continue\n            seen.add(key)\n\n            changes.append(ExtractedChange(\n                from_text=clean_from,\n                to_text=clean_to,\n                context_before=context_before,\n                context_after=context_after,\n                position=original_start,\n                change_type=change_type,\n                confidence=confidence,\n                learnable=(\n                    learnable\n                    and learnable_length\n                    and not formatting_only\n                    and bool(clean_from)\n                    and bool(clean_to)\n                    and self._contains_lexical_text(clean_from)\n                    and self._contains_lexical_text(clean_to)\n                ),\n            ))\n\n            # CRITICAL FIX: Prevent DoS from excessive changes\n            if len(changes) > MAX_CHANGES:\n                raise InputValidationError(\n                    \"Correction produced more than \"\n                    f\"{MAX_CHANGES} auditable changes; refusing to truncate \"\n                    \"history for modified text\"\n                )\n\n    logger.debug(f\"Extracted {len(changes)} changes\")\n    return changes\n",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "Project source file, rapidfuzz",
      "display": "daymade-audio/transcript-fixer/scripts/core/change_extractor.py",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Project full_name, rapidfuzz",
      "display": "daymade/claude-code-skills",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "Project stargazers_count, rapidfuzz",
      "display": "1.5K",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "Library name, jsonpatch",
      "display": "JSON Patch",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Monthly downloads, jsonpatch",
      "display": "137.3M",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "License, jsonpatch",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Package release, jsonpatch",
      "display": "1.47",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Package release date, jsonpatch",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Install, jsonpatch",
      "display": "pip install jsonpatch",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "Quickstart, jsonpatch",
      "display": "import jsonpatch\n\nsource = {\"name\": \"old\"}\npatch = jsonpatch.make_patch(source, {\"name\": \"new\"})\nprint(patch.patch)\n",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "Repository stars, jsonpatch",
      "display": "500",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "JSON object diff, jsonpatch",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Patch without target, jsonpatch",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Input and change model, jsonpatch",
      "display": "RFC6902JSON operation lists for interoperable document updates.",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "Python prerequisite, jsonpatch",
      "display": ">=3.11",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "Application integration, jsonpatch",
      "display": "Current1.47 apply_patch(doc,patch,in_place=False) accepts a JSON document including null and an operation sequence. Original call passes None plus a deep copy of accumulated RFC6902 operations. The stream must contain valid root initialization before dependent paths; arbitrary invalid patches are not certified.",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Project function, jsonpatch",
      "display": "def __add__(self, other: RunLogPatch | Any) -> RunLog:\n    \"\"\"Combine two `RunLogPatch` instances.\n\n    Args:\n        other: The other `RunLogPatch` to combine with.\n\n    Raises:\n        TypeError: If the other object is not a `RunLogPatch`.\n\n    Returns:\n        A new `RunLog` representing the combination of the two.\n    \"\"\"\n    if type(other) is RunLogPatch:\n        ops = self.ops + other.ops\n        state = jsonpatch.apply_patch(None, copy.deepcopy(ops))\n        return RunLog(*ops, state=state)\n\n    msg = f\"unsupported operand type(s) for +: '{type(self)}' and '{type(other)}'\"\n    raise TypeError(msg)\n",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "Project source file, jsonpatch",
      "display": "libs/core/langchain_core/tracers/log_stream.py",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "Project full_name, jsonpatch",
      "display": "langchain-ai/langchain",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "Project stargazers_count, jsonpatch",
      "display": "149.7K",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "Library name, deepdiff",
      "display": "DeepDiff",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "Monthly downloads, deepdiff",
      "display": "62.8M",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "License, deepdiff",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "Package release, deepdiff",
      "display": "9.2.1",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "Package release date, deepdiff",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Install, deepdiff",
      "display": "pip install deepdiff",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Quickstart, deepdiff",
      "display": "from deepdiff import DeepDiff\n\nprint(DeepDiff({\"name\": \"old\"}, {\"name\": \"new\"}))\n",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "Repository stars, deepdiff",
      "display": "2.5K",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "JSON object diff, deepdiff",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "Patch without target, deepdiff",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Input and change model, deepdiff",
      "display": "Nested Python-object difference reports plus a separate Delta replay interface.",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "Python prerequisite, deepdiff",
      "display": ">=3.11",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "Application integration, deepdiff",
      "display": "Current9.2.1 supports positional actual/intended JSON-like objects,ignore_order=obj.ordered,report_repetition=True,and threshold_to_diff_deeper=0. Default text-view result remains dictionary-like with get/keys and documented dictionary_item/iterable_item/values_changed/type_changes categories.",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "Library name, Levenshtein",
      "display": "Levenshtein",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "Monthly downloads, Levenshtein",
      "display": "20.5M",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "License, Levenshtein",
      "display": "GPL-2.0-or-later",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Package release, Levenshtein",
      "display": "0.27.5",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "Package release date, Levenshtein",
      "display": "Sep 2026",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Install, Levenshtein",
      "display": "pip install Levenshtein",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Quickstart, Levenshtein",
      "display": "from Levenshtein import editops\n\nprint(editops(\"spam\", \"park\"))\n",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Official description, Levenshtein",
      "display": "Computes string edit distances and similarities in a Python extension.",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Quickstart source file, Levenshtein",
      "display": "levenshtein.html",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "Repository stars, Levenshtein",
      "display": "401",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "JSON object diff, Levenshtein",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Patch without target, Levenshtein",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "Input and change model, Levenshtein",
      "display": "Character edit tuples and additional string-distance/median interfaces; current consumer builds spelling error masks.",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "Python prerequisite, Levenshtein",
      "display": ">=3.11",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Application integration, Levenshtein",
      "display": "Whole module imports the separate Levenshtein package. Current0.27.5 editops(correct,source) returns operation/source-index/destination-index triples; argument reversal is intentional and retained. Nonempty suitable target text and project error2idx mapping required for consumer mask indexing.",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "Shared backend relationship, Levenshtein",
      "display": "rapidfuzz<4.0.0,>=3.9.0",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "Project function, Levenshtein",
      "display": "def get_levenshtein_mask(source, correct, error2idx):\n    mask = [[0] for _ in range(len(correct))]\n    changes = Levenshtein.editops(correct, source)\n    changes_letters = []\n    for change in changes:\n        if change[0] == 'delete' or change[0] == 'replace':\n            changes_letters.append((change[0], change[1], change[2], correct[change[1]]))\n        else:\n            changes_letters.append((change[0], change[1], change[2], source[change[2]]))\n    swap_changes = []\n    i = 0\n    while i < len(changes_letters) - 1:\n        change_1 = changes_letters[i]\n        change_2 = changes_letters[i + 1]\n        if change_1[0] == 'insert' and change_2[0] == 'delete' and change_1[3] == change_2[3] and change_2[1] - \\\n                change_1[1] == 1:\n            swap_changes.append(('swap', change_1[1], change_1[2], change_1[3]))\n            swap_changes.append(('swap', change_2[1], change_1[2] + 1, change_2[3]))\n            i += 2\n        else:\n            swap_changes.append(change_1)\n            i += 1\n    if i == len(changes_letters) - 1:\n        swap_changes.append(changes_letters[i])\n\n    for change in swap_changes:\n        if change[0] == 'delete':\n            mask[change[1]][0] = -1\n        elif change[0] == 'replace':\n            mask[change[1]][0] = error2idx['replace']\n        elif change[0] == 'insert':\n            mask[change[1] - 1].append(error2idx['add'])\n        elif change[0] == 'swap':\n            mask[change[1]][0] = error2idx['swap']\n    new_mask = []\n    for m in mask:\n        new_mask.extend(m)\n\n    return new_mask\n",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Project source file, Levenshtein",
      "display": "sage/spelling_correction/training/data_utils.py",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "Project full_name, Levenshtein",
      "display": "ai-forever/sage",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "Project stargazers_count, Levenshtein",
      "display": "169",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Library name, jsondiff",
      "display": "jsondiff",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "Monthly downloads, jsondiff",
      "display": "7.1M",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "License, jsondiff",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Package release, jsondiff",
      "display": "2.2.1",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "Package release date, jsondiff",
      "display": "Aug 2024",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Install, jsondiff",
      "display": "pip install jsondiff",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Quickstart, jsondiff",
      "display": "import jsondiff\n\nprint(jsondiff.diff({\"name\": \"old\"}, {\"name\": \"new\"}))\n",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Official description, jsondiff",
      "display": "Diffs JSON and JSON-like structures in Python.",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "Quickstart source file, jsondiff",
      "display": "jsondiff/__init__.py and published README",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "Repository stars, jsondiff",
      "display": "751",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "JSON object diff, jsondiff",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Patch without target, jsondiff",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "Input and change model, jsondiff",
      "display": "Compact,explicit,or symmetric nested JSON change notation with optional input loading and marshaling.",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Python prerequisite, jsondiff",
      "display": ">=3.8",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "Application integration, jsondiff",
      "display": "Current2.2.1 diff wrapper forwards load=True and syntax=\"explicit\" to JsonDiffer. Both RPC results are JSON strings decoded by the native loader; explicit syntax is an own supported syntax, not RFC6902. Original async RPC and Click operations are host context, not JSONdiff calls.",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "Output serialization, jsondiff",
      "display": "Native Symbol-key change representation needs supported marshal/dump modes for JSON transport; explicit syntax is not RFC6902.",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Project function, jsondiff",
      "display": "async def _run(self, client: OpenrCtrlCppClient.Async, file: str, *args, **kwargs):\n    running_conf = await client.getRunningConfig()\n\n    try:\n        file_conf = await client.dryrunConfig(file)\n    except OpenrError as ex:\n        click.echo(click.style(f\"FAILED: {ex}\", fg=\"red\"))\n        return\n\n    res = jsondiff.diff(running_conf, file_conf, load=True, syntax=\"explicit\")\n    if res:\n        click.echo(click.style(\"DIFF FOUND!\", fg=\"red\"))\n        print(f\"== diff(running_conf, {file}) ==\")\n        print(res)\n    else:\n        click.echo(click.style(\"SAME\", fg=\"green\"))\n",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Project source file, jsondiff",
      "display": "openr/py/openr/cli/commands/config.py",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "Project full_name, jsondiff",
      "display": "meta/openr",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Project stargazers_count, jsondiff",
      "display": "941",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Library name, diff-match-patch",
      "display": "Diff Match Patch",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "Monthly downloads, diff-match-patch",
      "display": "6.8M",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "License, diff-match-patch",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "Package release, diff-match-patch",
      "display": "20241021",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Package release date, diff-match-patch",
      "display": "Oct 2024",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "Install, diff-match-patch",
      "display": "pip install diff-match-patch",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "Quickstart, diff-match-patch",
      "display": "from diff_match_patch import diff_match_patch\n\ndmp = diff_match_patch()\nprint(dmp.diff_main(\"spam\", \"park\"))\n",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "Official description, diff-match-patch",
      "display": "Repackages the Google Diff Match and Patch libraries.",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Quickstart source file, diff-match-patch",
      "display": "diff_match_patch/diff_match_patch.py",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "Repository stars, diff-match-patch",
      "display": "59",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "JSON object diff, diff-match-patch",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "Patch without target, diff-match-patch",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "Input and change model, diff-match-patch",
      "display": "Text diff/patch objects with context matching and patch-coordinate utilities.",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Python prerequisite, diff-match-patch",
      "display": ">=3.7",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Application integration, diff-match-patch",
      "display": "Current20241021 constructor,Diff_Timeout numeric property,diff_main(text,text),diff_prettyHtml(diff),and diff_xIndex(diff,index) remain present with matching arguments. Patches are populated native patch_obj values with integer start1/start2 and diffs,not arbitrary newly created None-index placeholders.",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "Patch object fields, diff-match-patch",
      "display": "Native patch objects contain source/target start coordinates and diff text; current consumer mutates start coordinates for remapping.",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "Project function, diff-match-patch",
      "display": "def map_patches(texts, patches, debug):\n    search_text, replace_text, original_text = texts\n\n    dmp = diff_match_patch()\n    dmp.Diff_Timeout = 5\n\n    diff_s_o = dmp.diff_main(search_text, original_text)\n    # diff_r_s = dmp.diff_main(replace_text, search_text)\n\n    # dmp.diff_cleanupSemantic(diff_s_o)\n    # dmp.diff_cleanupEfficiency(diff_s_o)\n\n    if debug:\n        html = dmp.diff_prettyHtml(diff_s_o)\n        Path(\"tmp.html\").write_text(html)\n\n        dump(len(search_text))\n        dump(len(original_text))\n\n    for patch in patches:\n        start1 = patch.start1\n        start2 = patch.start2\n\n        patch.start1 = dmp.diff_xIndex(diff_s_o, start1)\n        patch.start2 = dmp.diff_xIndex(diff_s_o, start2)\n\n        if debug:\n            print()\n            print(start1, repr(search_text[start1 : start1 + 50]))\n            print(patch.start1, repr(original_text[patch.start1 : patch.start1 + 50]))\n            print(patch.diffs)\n            print()\n\n    return patches\n",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Project source file, diff-match-patch",
      "display": "aider/coders/search_replace.py",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "Project full_name, diff-match-patch",
      "display": "Aider-AI/aider",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "Project stargazers_count, diff-match-patch",
      "display": "50.2K",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Library name, dictdiffer",
      "display": "dictdiffer",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "Monthly downloads, dictdiffer",
      "display": "5.8M",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "License, dictdiffer",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Package release, dictdiffer",
      "display": "0.10.0",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "Package release date, dictdiffer",
      "display": "Jul 2026",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "Install, dictdiffer",
      "display": "pip install dictdiffer",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "Quickstart, dictdiffer",
      "display": "from dictdiffer import diff\n\nprint(list(diff({\"name\": \"old\"}, {\"name\": \"new\"})))\n",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "Repository stars, dictdiffer",
      "display": "849",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "JSON object diff, dictdiffer",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F246": {
      "label": "Patch without target, dictdiffer",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F247": {
      "label": "Input and change model, dictdiffer",
      "display": "Lazy Python change tuples and reversible patch/swap operations over nested containers.",
      "asOf": "2026-11-20"
    },
    "F248": {
      "label": "Python prerequisite, dictdiffer",
      "display": ">=3.7",
      "asOf": "2026-11-20"
    },
    "F249": {
      "label": "Application integration, dictdiffer",
      "display": "Actual module imports diff from dictdiffer. Current0.10 diff(old_fields,new_fields),diff([field],[]),and diff([],[new_fields[index]]) accept lists of nested mappings and return change iterators. Ordinary helper calls are not extra SDK native calls. Caller field records must have the chosen identity key and second key when duplicates require it.",
      "asOf": "2026-11-20"
    },
    "F250": {
      "label": "Project function, dictdiffer",
      "display": "def get_dict_diff_by_key(\n    old_fields: list[dict],\n    new_fields: list[dict],\n    key: str = \"through\",\n    second_key: str = \"forward_key\",\n) -> Generator[tuple[str, Any, Any]]:\n    \"\"\"\n    Compare two list by key instead of by index\n\n    :param old_fields: previous field info list\n    :param new_fields: current field info list\n    :param key: if two dicts have the same value of this key, action is change; otherwise, is remove/add\n    :param second_key: if multi fields with same value of key, use `(field[key], field[second_key])` as ident\n    :return: similar to dictdiffer.diff\n\n    Example::\n\n        >>> old = [{'through': 'a'}, {'through': 'b'}, {'through': 'c'}]\n        >>> new = [{'through': 'a'}, {'through': 'c'}]  # remove the second element\n        >>> list(diff(old, new))\n        [('change', [1, 'through'], ('b', 'c')),\n         ('remove', '', [(2, {'through': 'c'})])]\n        >>> list(get_dict_diff_by_key(old, new))\n        [('remove', '', [(0, {'through': 'b'})])]\n\n    \"\"\"\n    length_old, length_new = len(old_fields), len(new_fields)\n    if length_old == 0 or length_new == 0:\n        yield from diff(old_fields, new_fields)\n    elif length_old == length_new == 1:\n        yield from _get_field_diffs(old_fields[0], new_fields[0])\n    else:\n        should_use_second_key = len({i[key] for i in old_fields}) < length_old or (\n            len({i[key] for i in new_fields}) < length_new\n        )\n        value_index: dict[str | tuple[str, str], int] = (\n            {(f[key], f[second_key]): i for i, f in enumerate(new_fields)}\n            if should_use_second_key\n            else {f[key]: i for i, f in enumerate(new_fields)}\n        )\n        additions = set(range(length_new))\n        for field in old_fields:\n            value = (field[key], field[second_key]) if should_use_second_key else field[key]\n            if (index := value_index.get(value)) is not None:\n                additions.remove(index)\n                yield from _get_field_diffs(field, new_fields[index])  # change\n            else:\n                yield from diff([field], [])  # remove\n        if additions:\n            for index in sorted(additions):\n                yield from diff([], [new_fields[index]])  # add\n",
      "asOf": "2026-11-20"
    },
    "F251": {
      "label": "Project source file, dictdiffer",
      "display": "aerich/utils.py",
      "asOf": "2026-11-20"
    },
    "F252": {
      "label": "Project full_name, dictdiffer",
      "display": "tortoise/aerich",
      "asOf": "2026-11-20"
    },
    "F253": {
      "label": "Project stargazers_count, dictdiffer",
      "display": "1.1K",
      "asOf": "2026-11-20"
    },
    "F254": {
      "label": "Library name, xmldiff",
      "display": "xmldiff",
      "asOf": "2026-11-20"
    },
    "F255": {
      "label": "Monthly downloads, xmldiff",
      "display": "345.8K",
      "asOf": "2026-11-20"
    },
    "F256": {
      "label": "License, xmldiff",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F257": {
      "label": "Package release, xmldiff",
      "display": "3.0",
      "asOf": "2026-11-20"
    },
    "F258": {
      "label": "Package release date, xmldiff",
      "display": "Jun 2026",
      "asOf": "2026-11-20"
    },
    "F259": {
      "label": "Install, xmldiff",
      "display": "pip install xmldiff",
      "asOf": "2026-11-20"
    },
    "F260": {
      "label": "Quickstart, xmldiff",
      "display": "from xmldiff import main\n\nprint(main.diff_texts(\"<root/>\", \"<root><item/></root>\"))\n",
      "asOf": "2026-11-20"
    },
    "F261": {
      "label": "Official description, xmldiff",
      "display": "Creates diffs of XML files.",
      "asOf": "2026-11-20"
    },
    "F262": {
      "label": "Quickstart source file, xmldiff",
      "display": "api.html",
      "asOf": "2026-11-20"
    },
    "F263": {
      "label": "Repository stars, xmldiff",
      "display": "231",
      "asOf": "2026-11-20"
    },
    "F264": {
      "label": "JSON object diff, xmldiff",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F265": {
      "label": "Patch without target, xmldiff",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F266": {
      "label": "Input and change model, xmldiff",
      "display": "Semantic XML tree edit actions plus configurable text/XML formatting and native patching.",
      "asOf": "2026-11-20"
    },
    "F267": {
      "label": "Python prerequisite, xmldiff",
      "display": ">=3.8",
      "asOf": "2026-11-20"
    },
    "F268": {
      "label": "Application integration, xmldiff",
      "display": "Current3.0 diff_trees accepts two lxml roots/trees and optional formatter. Without formatter the result is an edit-action sequence; DiffFormatter() gives readable edit-script text in the verbose branch. Tree cleaning and libvirt operations are host code,not additional SDK calls.",
      "asOf": "2026-11-20"
    },
    "F269": {
      "label": "Project function, xmldiff",
      "display": "def define(self):\n    if self.specDefXML is not None:\n        if self.subject is not None:\n            oldDefETree = self.subject.descriptionETree()\n            foundName = oldDefETree.find(\"name\").text\n            if foundName != self.specName:\n                self.subject.undefine()\n            self.oc._cleanDefETree(self.specDefXML,oldDefETree)\n            self.vreport(\"redefine\")\n            newvobject = self.oc._fromXML(self.specDefXML)\n            match self.restart:\n                case True:\n                    self.vreport(\"always restart\")\n                    self.subject._deactivate()\n                case False:\n                    self.vreport(\"never restart\")\n                case None:\n                    self.vreport(\"detect restart\")\n                    newDefETree = newvobject.descriptionETree()\n                    self.oc._cleanDefETree(self.specDefXML,newDefETree)\n                    diff = xmldiff.main.diff_trees(oldDefETree,newDefETree)\n                    if len(diff) > 0:\n                        if self.oc.session.verbose:\n                            difftext = xmldiff.main.diff_trees(oldDefETree,newDefETree,formatter=xmldiff.formatting.DiffFormatter())\n                            self.vreport(\"changed:\\n\" + difftext)\n                        self.subject._deactivate()\n                    else:\n                        self.vreport(\"unchanged\")\n            self.subject = newvobject\n        else:\n            self.vreport(\"define new\")\n            self.subject = self.oc._fromXML(self.specDefXML)\n",
      "asOf": "2026-11-20"
    },
    "F270": {
      "label": "Project source file, xmldiff",
      "display": "tool/nixvirt.py",
      "asOf": "2026-11-20"
    },
    "F271": {
      "label": "Project full_name, xmldiff",
      "display": "AshleyYakeley/NixVirt",
      "asOf": "2026-11-20"
    },
    "F272": {
      "label": "Project stargazers_count, xmldiff",
      "display": "408",
      "asOf": "2026-11-20"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best Python diff libraries difflib DeepDiff Dictdiffer jsonpatch code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
