# Overview
Diff 2 python lists using a given key
[](https://codecov.io/gh/rkhwaja/pylistdiff)
# Usage
``` python
listA = [3, 2, 1]
listB = [5, 4, 3]
inA, inBoth, inB = DiffUnsortedLists(listA=listA, listB=listB, keyA=lambda x: x, keyB=lambda x: x)
assert inA == [1, 2]
assert inBoth == [(3, 3)]
assert inB == [4, 5]
listA = [1, 2, 3]
listB = [3, 4, 5]
resultB = DiffListsByKey(iterA=iter(listA), iterB=iter(listB), keyA=lambda x: x, keyB=lambda x: x)
assert inA == [1, 2]
assert inBoth == [(3, 3)]
assert inB == [4, 5]
```
Raw data
{
"_id": null,
"home_page": "https://github.com/rkhwaja/pylistdiff",
"name": "listdiff",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "",
"author": "Rehan Khwaja",
"author_email": "rehan@khwaja.name",
"download_url": "https://files.pythonhosted.org/packages/2e/3d/34635be44c0d0d2b519faf613ea52a18f964d6a591cb387e567bd1182a1c/listdiff-1.0.2.tar.gz",
"platform": null,
"description": "# Overview\n\nDiff 2 python lists using a given key\n\n[](https://codecov.io/gh/rkhwaja/pylistdiff)\n\n# Usage\n\n``` python\nlistA = [3, 2, 1]\nlistB = [5, 4, 3]\ninA, inBoth, inB = DiffUnsortedLists(listA=listA, listB=listB, keyA=lambda x: x, keyB=lambda x: x)\nassert inA == [1, 2]\nassert inBoth == [(3, 3)]\nassert inB == [4, 5]\n\nlistA = [1, 2, 3]\nlistB = [3, 4, 5]\nresultB = DiffListsByKey(iterA=iter(listA), iterB=iter(listB), keyA=lambda x: x, keyB=lambda x: x)\nassert inA == [1, 2]\nassert inBoth == [(3, 3)]\nassert inB == [4, 5]\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Diff 2 python lists using a given key",
"version": "1.0.2",
"project_urls": {
"Homepage": "https://github.com/rkhwaja/pylistdiff"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "219a1a0c9e8bbc880ade56031d63f77fe4f3daa152425a81a5bbee3733a9e1f3",
"md5": "ceabdc72384c5e1a2a24982e6f5e3869",
"sha256": "23a28d6e94949419b44c0dc96d9f8109cf865104b950d83bc8eae33c79da7044"
},
"downloads": -1,
"filename": "listdiff-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ceabdc72384c5e1a2a24982e6f5e3869",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 3264,
"upload_time": "2023-10-04T04:29:09",
"upload_time_iso_8601": "2023-10-04T04:29:09.217991Z",
"url": "https://files.pythonhosted.org/packages/21/9a/1a0c9e8bbc880ade56031d63f77fe4f3daa152425a81a5bbee3733a9e1f3/listdiff-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2e3d34635be44c0d0d2b519faf613ea52a18f964d6a591cb387e567bd1182a1c",
"md5": "816653b6758c8aeb1102982622569865",
"sha256": "3a000f1087a2d02253d35a9fa25ab2c156df7608caf6da5220006ace9f5f990c"
},
"downloads": -1,
"filename": "listdiff-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "816653b6758c8aeb1102982622569865",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 3050,
"upload_time": "2023-10-04T04:29:10",
"upload_time_iso_8601": "2023-10-04T04:29:10.722456Z",
"url": "https://files.pythonhosted.org/packages/2e/3d/34635be44c0d0d2b519faf613ea52a18f964d6a591cb387e567bd1182a1c/listdiff-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-04 04:29:10",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "rkhwaja",
"github_project": "pylistdiff",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "listdiff"
}