Gendiff (GENerator of DIFFerences) - a program defining the difference between two data structures (JSON and/or YAML) and generating new structure containing differences details (including unchanged).
This is the second project implemented for educational purposes in the learning process on the Hexlet study platform
- Supported input formats: YAML, JSON
- Report generation as plain text, structured text and JSON
- Usage as CLI util or library function
pip install git+https://github.com/IDilettant/python-project-lvl2.git
from gendiff import generate_diff
diff = generate_diff(first_file_path, second_file_path, formatter)
$ gendiff -h
usage: gendiff [-h] [-f {json,plain,stylish}] first_file second_file
Generate difference of two JSON or YAML files.
positional arguments:
first_file first file to compare
second_file second file to compare
optional arguments:
-h, --help show this help message and exit
-f {json,plain,stylish}, --format {json,plain,stylish}
set output format (default: 'stylish')