A Python package to diff two dictionaries
Project description
pyDictDiff
Visit https://pypi.org/project/pydictdiff/
This is a dictionary diff package for python.
Installation
These instructions will get you a copy of the package up and running on your terminal for development and testing purposes.
To install, type:
pip install pydictdiff
Alternatively, to clone (with HTTPS):
git clone https://gitlab.com/anupamkrish/pydictdiff.git
or (with SSH):
git clone git@gitlab.com:anupamkrish/pydictdiff.git
Usage
Import the package
>>> from diffTool import Diff
Instantiate the class
>>> x = Diff(
{
"A": "B",
"C": {
"D": "E"
}
},
{
"A": "X",
"C": {
"D": "Y"
}
}
)
Access the differences through variable "result"
>>> x.result
{
"A": {
"[-]": "B",
"[+]": "X"
},
"C": {
"D": {
"[-]": "E",
"[+]": "Y"
}
}
}
Future work:
- Support for arrays
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pydictdiff-1.0.2.tar.gz.
File metadata
- Download URL: pydictdiff-1.0.2.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d450007421be96e7b8e2660a4fda64775d8f6b3add80ff239637de596693e919
|
|
| MD5 |
1b46acdc744e4494683644884f6a97fa
|
|
| BLAKE2b-256 |
5ef1b302518d8ba7bef4da7d68dfd79b89f283aaa7a66686d14a1a5d5217edc1
|
File details
Details for the file pydictdiff-1.0.2-py3-none-any.whl.
File metadata
- Download URL: pydictdiff-1.0.2-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8acde6bb455d8287945d4dc718951de98da60383cd3f782296c3d075d4c202d2
|
|
| MD5 |
f02ea5d1c8596cdb5975387964091fac
|
|
| BLAKE2b-256 |
f01af39b1df6cda8a89b4b0cbb07119a77bdbfc7a27a103ce4befc65002ff414
|