Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

structurediff is a diff utility for structured data files

Project Description

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)
Release History

Release History

This version
History Node

1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
structurediff-1.0.tar.gz (17.1 kB) Copy SHA256 Checksum SHA256 Source Dec 6, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting