Registry / testing / deepcomparer

deepcomparer

JSON →
library0.4.0pypypi✓ verified 81d ago

A Python library for deep comparison of nested structures like dicts, lists, and iterables. Current version 0.4.0 (beta). Active development with monthly releases.

pip install deepcomparer
INSTALL
IMPORT
SIG · DEEPCOMPARER
D
deepcomparer
testingpythonv0.4.0
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.4.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

deep_compare
from deepcomparer import deep_compare
from deepcomparer import DeepComparer

Compare two nested dicts and print differences.

from deepcomparer import DeepComparer dc = DeepComparer() result = dc.compare( {'a': 1, 'b': {'c': 2}}, {'a': 1, 'b': {'c': 3}} ) print(result.differences())
Debug
Known issues
breakingLibrary is in beta (pre-1.0). Breaking changes between minor versions expected; upgrade with caution.
fix
Pin to exact version in requirements.txt, e.g. deepcomparer==0.4.0
affects: <1.0.0
gotchaOrder of keys in dicts does not affect comparison; however, order of list items does. May cause unexpected mismatches if lists are compared element-wise.
fix
Ensure lists are sorted before comparison if order is irrelevant.
affects: all
gotchaNested iterables other than dict/list (e.g., set, tuple) are compared as-is; sets are compared unordered, tuples ordered.
fix
Convert custom iterables to list/dict if deep comparison should treat them same.
affects: all
Upgrade
Version history
0.4.0latest on PyPI · released Jan 1, 2023
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
deepcomparer — pip install deepcomparer · libregistry