No project description provided
Project description
quickdiff
quickdiff
is a python library for quickly finding nested differences between two python objects.
Usage:
from quickdiff import *
a = {1: 1, 2: 2, 3: [3], 4: 4}
b = {1: 1, 2: 4, 3: [3, 4], 5: 5, 6: 6}
report = quickdiff(a, b)
assert report == DiffReport(
val_changes=[ValChange(path=[2], a=2, b=4)],
type_and_val_changes=[],
dict_items_added=[DictDiff(path=[], key=5, val=5), DictDiff(path=[], key=6, val=6)],
dict_items_removed=[DictDiff(path=[], key=4, val=4)],
iter_len_mismatch=[IterLenMismatch(path=[3], a_len=1, b_len=2)]
)
Diff objects (ValChange
, DictDiff
, etc) are NamedTuples for improved ergonomics and thus can be unpacked as you would any tuple:
for path, a, b in report.val_changes:
print(path, a, b)
# ([2], 2, 4)
Why not DeepDiff
I wrote this because DeepDiff is quite slow as it's written in pure Python and has a lot of features.
Quickdiff on the other hand is simple and written in Rust. The current implementation yields a 16x performance boost on my personal benchmarks.
Development
Use maturin
for development:
pip install maturin
Compile development version with:
maturin development
Run tests:
python -m unittest discover tests
Roadmap
- support for sets (currently is treated as an iterator)
- parallelize for improved performance (by using
pyo3-ffi
to sidestep the Python runtime) - attribute diff checking for python objects
- support custom
__eq__()
implementations
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file quickdiff-0.1.5.tar.gz
.
File metadata
- Download URL: quickdiff-0.1.5.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95694cab4aef53fcf23f28c5397937b668071e0b795651eae97ba4e37b2de859 |
|
MD5 | 1ef2ff47c02bfc55cc09a247b0e7c146 |
|
BLAKE2b-256 | ca3403c2d995bdfae0da92a044c1bf8abe68a8b5d3017ccb9eacfc6a25471d14 |
File details
Details for the file quickdiff-0.1.5-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: quickdiff-0.1.5-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 614d3c384da514e1431e9b3fa9696d0833931be0fad31823bc72ba8799d0a876 |
|
MD5 | 45532f59d2e4a8d4a2106d460c454983 |
|
BLAKE2b-256 | 9389007b53fd938313eb2bd01d444eddf163e063a1bf850afd9fea012a317df0 |
File details
Details for the file quickdiff-0.1.5-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: quickdiff-0.1.5-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27ba027a60a06a7ab9da8cba09b086dbbedf34252c71d7ef79f600cbc051aeb5 |
|
MD5 | 4457b965b476920b652acf0ba3b4d5ca |
|
BLAKE2b-256 | d8b70baaffcf5fe2d08f5a1ea8f4ecdd6d09e0b86e3169e74f29077ecdcd8cc7 |
File details
Details for the file quickdiff-0.1.5-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: quickdiff-0.1.5-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1746236fdbd1ecb57eb691025424014e6ed66c6417d4116358220d64e54b324 |
|
MD5 | ae57f38c69b2806d348351bda73cefeb |
|
BLAKE2b-256 | 84ba3c06dde6eb36096ae096b84f197bcef4a2198366abdc4ff07ddc3c3ac7ee |
File details
Details for the file quickdiff-0.1.5-cp311-none-win_amd64.whl
.
File metadata
- Download URL: quickdiff-0.1.5-cp311-none-win_amd64.whl
- Upload date:
- Size: 155.7 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a558d21f649ea64ccdec482fac857d34cb8ee7443ec2a9d84655b935c942e5a |
|
MD5 | 65732edd3b3caf612a7a19322a8988a6 |
|
BLAKE2b-256 | b89292be5ddaeec63f2b92789dd9057f9688576dbb4629471e2014dc799f7016 |
File details
Details for the file quickdiff-0.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: quickdiff-0.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac783b2333a1d747dcdc951d4b809d391b6f448c7a1802fa48ea228324afdaf3 |
|
MD5 | 956a6ef47c382f68ae506884b375dc0c |
|
BLAKE2b-256 | 5d83b3326d483ed788f8817cf2d26fae49338d3e2f0f15d7e3c518679d225a3c |
File details
Details for the file quickdiff-0.1.5-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: quickdiff-0.1.5-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 548.8 kB
- Tags: CPython 3.11, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d482bcf5f8700f9194ef374155b61c6ae5ba8ed810c4d62c1e6ecb745cef0062 |
|
MD5 | 1b87ccf6ffd4ac24860c334341dfd520 |
|
BLAKE2b-256 | e40d6e0c6c5917c7234cf8abc2ba16064edbb24a188d0d8870c3ec1a20ca28e5 |
File details
Details for the file quickdiff-0.1.5-cp310-none-win_amd64.whl
.
File metadata
- Download URL: quickdiff-0.1.5-cp310-none-win_amd64.whl
- Upload date:
- Size: 155.7 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3412a4774ad26bd0809cb78fa00b64d9e7ece95cd71daaf74d0ee6cd6f02506 |
|
MD5 | fa780ee3b9ff1dbbe43e636d866ff071 |
|
BLAKE2b-256 | 80275d2cc8204d561f7ef7c6f5f3f06c4093e3b172c2e9ec38119f2317e91b9f |
File details
Details for the file quickdiff-0.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: quickdiff-0.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | adf861909e35154f344cd893b2a3c159a8bc4ffe52d9b2dc494b7caa40ce118a |
|
MD5 | 2a68995645cf55f002aa0cf86751f5f8 |
|
BLAKE2b-256 | 1f69d0f67f08d39c6b695145f0c03d4d9f69c9eaa9457df678a1ad20f55340f1 |
File details
Details for the file quickdiff-0.1.5-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: quickdiff-0.1.5-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 548.8 kB
- Tags: CPython 3.10, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7064e8d4afb69aa4a89ca0d2dbd060ca55cc1ec2b076262e1af787dcaf21d6a2 |
|
MD5 | 4a228efd0a36c0d3395131eb63e9793c |
|
BLAKE2b-256 | 5b143e007fa8ab33cbe85215f7130e471da3a6684474e0088fd00573ebe2309a |
File details
Details for the file quickdiff-0.1.5-cp39-none-win_amd64.whl
.
File metadata
- Download URL: quickdiff-0.1.5-cp39-none-win_amd64.whl
- Upload date:
- Size: 156.0 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6904adcb774dbdaeb76a719a6f35f30d2e06097a203d07fe1bd80e9fe4349b92 |
|
MD5 | ff4fda01781e4eae8f56570448fb0312 |
|
BLAKE2b-256 | ffc4587aee96064f2c5761aba3dd62b0567c7aae07d9fe4c5fa63f993ae714b9 |
File details
Details for the file quickdiff-0.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: quickdiff-0.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b3b23caab836f8dbc14ae51a13366d656545169371551d154791824e6fa9eb4 |
|
MD5 | 42494639d3be7df9bdde933577650315 |
|
BLAKE2b-256 | 93409d7ad1fa143bdd738d0af1ada7b131e37b04cdf8401a4a2fba7de9aecdd7 |
File details
Details for the file quickdiff-0.1.5-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: quickdiff-0.1.5-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 549.4 kB
- Tags: CPython 3.9, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c715385c2d63696849a01536a22047daad392c5a4d6733c58d9db4cb33df259 |
|
MD5 | 5dbc7e3c693687d8bf6600fcf606d23f |
|
BLAKE2b-256 | 0def2aa150b7bc8d4581330483e58bb44d50098ce7ea12c7ac86b5dff071164a |
File details
Details for the file quickdiff-0.1.5-cp38-none-win_amd64.whl
.
File metadata
- Download URL: quickdiff-0.1.5-cp38-none-win_amd64.whl
- Upload date:
- Size: 155.6 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2ab37122496df812867889b38bab1c400381f03dd2b2d1c6adcbd6cdf2e188a |
|
MD5 | 8bfc96cbbbd2294c5ece5674fc6dd60c |
|
BLAKE2b-256 | 37939b393d29e12d757d48bdb6a615f226b935a4a400be19e105da2b11bf98d5 |
File details
Details for the file quickdiff-0.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: quickdiff-0.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b27b7f10f59581b5df2a0e955d782759f54a2bf7da3b1f491bf5ee88d8f7bb3a |
|
MD5 | ca61b57977e94d9c230049e480bfcd74 |
|
BLAKE2b-256 | c1ac0e3e3f08257e168c249917df55692150f3437056aecd400cbfcf70cf19f8 |
File details
Details for the file quickdiff-0.1.5-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: quickdiff-0.1.5-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 548.9 kB
- Tags: CPython 3.8, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9414d931da8f9bea204220a34daf938486aed655fdc947cc728477c9fa036fe |
|
MD5 | 024f1febbafd14eb62ba618d8bd09a7d |
|
BLAKE2b-256 | 80c094df4680050190f0cf98c2574a1da9412c07eb8d54f404d085bbfc48bacf |
File details
Details for the file quickdiff-0.1.5-cp37-none-win_amd64.whl
.
File metadata
- Download URL: quickdiff-0.1.5-cp37-none-win_amd64.whl
- Upload date:
- Size: 155.5 kB
- Tags: CPython 3.7, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af9df1ae0b49d54ed06382efeaead37ddc509e30767070ac3c52ba4facf2054c |
|
MD5 | 0c81954256d70ff5df0be2809c62c66b |
|
BLAKE2b-256 | 0fb41e6242dcc6a03e76b1ca734b15547018fa0231672477c8c6ef8ad0596170 |
File details
Details for the file quickdiff-0.1.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: quickdiff-0.1.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ef66af3eb4f77a3b9fd57573dd0ec505bc45ad255024a8eff983075ed5d43ba |
|
MD5 | 778d029ae59b4f8fbb656f4e32a44aaf |
|
BLAKE2b-256 | bdfb9c3b0954b077f1f15e8dd7efc11303c9433103e105d1b63601c195280d85 |
File details
Details for the file quickdiff-0.1.5-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: quickdiff-0.1.5-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 548.9 kB
- Tags: CPython 3.7m, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63637eb0e30f7b41358fdad6bcc3edd3a1ef4dbfe40a09f8c250027ae533888c |
|
MD5 | f82d9fddb56ac93cadee4efc08e7d1c9 |
|
BLAKE2b-256 | 927f9bde1e21e15831be87e8347677dbf8b06bc4d446455f987cc16a887754b5 |