Pretty JSON data diffs
Project description
prettydiff
prettydiff - diff parsed JSON objects and pretty-print it
$ python3 -m pip install prettydiff
terminal
from prettydiff import print_diff
a = {"a": "hello", "b": True, "c": [1, 3], "d": {"e": {"f": 1}}}
b = {"a": "world", "b": False, "c": [1, 2, 3]}
# to enable colors: $ python3 -m pip install prettydiff[terminal]
print_diff(a, b)
{
- 'a': 'hello',
+ 'a': 'world',
- 'b': True,
+ 'b': False,
'c': [
1,
- 3,
+ 2,
+ 3,
],
- 'd': {
- 'e': {
- 'f': 1,
- },
- },
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
prettydiff-0.1.0.tar.gz
(5.0 kB
view details)
Built Distribution
File details
Details for the file prettydiff-0.1.0.tar.gz
.
File metadata
- Download URL: prettydiff-0.1.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0e5ffaa20ee7f8a0295732a954c2fbb2ff37471953f8ab8b0122cbe19497e55 |
|
MD5 | c4df6d730c7456afe0ab4f2898bca2de |
|
BLAKE2b-256 | 9d5fcaa9c6289b7a96631a3fb3762808e895eab6d8ccb92b15878159a14aab87 |
File details
Details for the file prettydiff-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: prettydiff-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 253eea65c5c632219078dffcec5884260b805e200e3cbdb1039f45b2d2bc6d1e |
|
MD5 | 049755aff7c420303753372f9529d291 |
|
BLAKE2b-256 | 5a0c0bbf8e8d5e1ad4ed9e5d4891c5ca90ca542430818974e0f80cb70053fb27 |