structurediff
structurediff is a tool (a command line wrapper really) that uses DeepDiff to provide a simple command line utility for ‘diffing’ (at a structural rather than line-based level) large YAML and/or JSON files (meaning it can diff YAML against YAML, or YAML against JSON, or JSON against JSON).
structurediff uses the pyyaml parser for both JSON and YAML to work around issues with unicode-ification of strings. As a result structurediff cannot be depended on to differentiate between unicode and non-unicode types between JSON and YAML.
contributing
Just reach out (or submit a patch or merge request). I try to keep an eye open.
todo
This code has no tests. It should have some.
howto
On the command line:
usage: structurediff [-h] [-d DIFF_VERBOSITY] [-i INDENT_LEVEL] [-v]
input1 input2
positional arguments:
input1 initial input
input2 input to compare against input1
optional arguments:
-h, --help show this help message and exit
-d DIFF_VERBOSITY, --diff-verbosity DIFF_VERBOSITY
set the DeepDiff verbose_level, 0-2 (default 1)
-i INDENT_LEVEL, --indent-level INDENT_LEVEL
set the pprint indent spacing (default 2)
-v, --verbose make output verbose_level
In Python (why would you do this? Use DeepDiff instead!):
from structurediff import DataComparison, DataFile comparison = DataComparison(DataFile(PATH), DataFile(PATH), VERBOSITY) print(comparison)
Metadata
Release files for structurediff 1.0
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 |
|---|---|---|---|---|
| structurediff-1.0.tar.gz | 17.1 kB | Without provenance | Details for structurediff-1.0.tar.gz |
Release files / structurediff-1.0.tar.gz
| Download URL | structurediff-1.0.tar.gz |
|---|---|
| Size | 17.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
25b85fc412ce7eed25de01576be8944ee8ea6d18c819425616e8a8b068903cdb
|
|
BLAKE2b-256 checksum How to use checksums |
8644c8a585145ab9bc2cfc95a083d34bcb594bd8ab494ba868dd2feaa159b73b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for structurediff 1.0
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.