yamldiff
A semantic YAML diff utility.
yamldiff file1.yaml file2.yaml
will show recursively the values that are added removed or modified from file1.yaml to file2.yaml.
The values of data type such as lists are compared by the whole value (i.e.) must match exactly, but it is possible to refine the diff output by considering them unordered sets instead:
$ cat file1.yaml
a_key : a value
a_list:
- {id: 1, val: uno}
- {id: 2, val: dos}
- {id: 3, val: tres}
$ cat file2.yaml
a_key : another value
abother_key: some value
a_list:
- {id: 1, val: uno}
- {id: 2, val: dos}
- {id: 3, val: cuatro}
$ python yamldiff.py file1.yaml file2.yaml
# Added keys:
+ abother_key: some value
# Modified keys:
a_key:
- a value
+ another value
a_list:
- [{id: 1, val: uno}, {id: 2, val: dos}, {id: 3, val: tres}]
+ [{id: 1, val: uno}, {id: 2, val: dos}, {id: 3, val: cuatro}]
$ python yamldiff.py file1.yaml file2.yaml --set-keys a_list
# Added keys:
+ abother_key: some value
# Modified keys:
a_key:
- a value
+ another value
a_list:
# Removed keys:
- {id: 3, val: tres}
# Added keys:
+ {id: 3, val: cuatro}
It is also possible to treat list as key value pairs, by specifying the element of the list items to index on:
$ python yamldiff.py file1.yaml file2.yaml --set-keys a_list:id
# Added keys:
+ abother_key: some value
# Modified keys:
a_key:
- a value
+ another value
a_list:
# Modified keys:
# Matching:
{id: 3}
# Modified keys:
val:
- tres
+ cuatro
Metadata
Release files for yamldiff 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| yamldiff-0.3.tar.gz | 4.7 kB | Without provenance | Details for yamldiff-0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| yamldiff-0.3-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for yamldiff-0.3-py2.py3-none-any.whl |
Total release size: 10.1 kB
Release files / yamldiff-0.3.tar.gz
| Download URL | yamldiff-0.3.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75b4dc34bcfb8b47c88f68253c03fb69b3c09aee43545d5fd32cb15639cb8bde
|
|
BLAKE2b-256 checksum How to use checksums |
bba30425b680f268c63825451052579d40c98ebdaf94e14ce3efcb29ca12c72f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.27.1
|
Release files / yamldiff-0.3-py2.py3-none-any.whl
| Download URL | yamldiff-0.3-py2.py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
51baa06acdbe0f427702094d49704ca4a3acd43d9366d42f7c0f7fbcd8fc0f6c
|
|
BLAKE2b-256 checksum How to use checksums |
3d00942e3c51cd709001f52375a23ca31e3a380929683aed1f66f0fc725b4563
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.27.1
|
Security for yamldiff 0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.