larzdiff
Human-readable diffs of two values — see exactly what changed.
When a test fails or two things should match but don't, you need to see the difference at a glance, not squint at two big blobs. larzdiff compares two values — strings, lists, dicts, or scalars — and describes exactly what changed: which keys, which lines, which items. Perfect for test failure messages and debugging. Zero third-party dependencies.
Install
pip install larzdiff
Use
from larzdiff import diff
print(diff({"a": 1, "b": 2}, {"a": 1, "b": 3})) # ~ 'b': 2 -> 3
print(diff([1, 2, 3], [1, 9, 3])) # ~ [1] 2 -> 9
print(diff("line one\nline two", "line one\nline 2"))
Learn to code with Larz
Part of the learn-to-code toolkit in the Larz stack — see the Learn to Code platform. Pairs with larztest.
Tests
python -m unittest discover -s tests -v # 7 tests
License
MIT (c) larz-scripter
Metadata
Release files for larzdiff 0.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 | |
|---|---|---|---|---|
| larzdiff-0.1.0.tar.gz | 5.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| larzdiff-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.5 kB
Release files / larzdiff-0.1.0.tar.gz
| Download URL | larzdiff-0.1.0.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
26c3b574ae419cbfe979ab89417067fef68b6697400bc53412672f1ae2422e17
|
|
BLAKE2b-256 checksum How to use checksums |
cb6e0374d9446c93064e80ea9ed40032a6d04967c5c83e37d1ca0465bb0ba273
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / larzdiff-0.1.0-py3-none-any.whl
| Download URL | larzdiff-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fcc0cff384dac8ae2b30d25309bceceaa0c61d340b66a64d187d2299d27acdfe
|
|
BLAKE2b-256 checksum How to use checksums |
adddd8fe175ad97a083ad830afd14a60b738875cbb9b0cc00dc8badc58b70ce2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Security for larzdiff 0.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.