{ "info": { "author": "Cory Johns", "author_email": "johnsca@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5" ], "description": "MeldDict |badge|\n----------------\n\n.. |badge| image:: https://travis-ci.org/johnsca/melddict.svg?branch=master\n :target: https://travis-ci.org/johnsca/melddict\n\nA dict subclass that supports adding and subtracting other Mappings to perform\nrecursive merging and removal.\n\nBy default, lists are also melded, but this can be configured. You can also\nhave keys whose values are empty after a subtraction dropped automatically.\n\nThe full documentation is available online at: https://melddict.readthedocs.io/\n\n\nExamples\n--------\n\nYou can add two mappings together to combine them:\n\n.. code:: python\n\n meld_dict = MeldDict({'a': 'a',\n 'b': [1, 2],\n 'c': {'1': 1},\n 'd': 'd'})\n norm_dict = {'b': [3, 4],\n 'c': {'2': 2},\n 'd': 'D',\n 'e': 'e'}\n meld_res = meld_dict + norm_dict\n meld_res == {'a': 'a',\n 'b': [1, 2, 3, 4],\n 'c': {'1': 1, '2': 2},\n 'd': 'D',\n 'e': 'e'}\n meld_dict += norm_dict # a.k.a. meld_dict.add(norm_dict)\n meld_dict == meld_res\n\nYou can also subtract one mapping from another:\n\n.. code:: python\n\n meld_dict = MeldDict({'a': 'a',\n 'b': [1, 2],\n 'c': {'1': 1, '2': 2},\n 'd': 'd'})\n norm_dict = {'b': [2, 3],\n 'c': {'2': 2, '3': 3},\n 'd': 'D',\n 'e': 'e'}\n meld_res = meld_dict - norm_dict\n meld_res == {'a': 'a',\n 'b': [1],\n 'c': {'1': 1}}\n meld_dict -= norm_dict # a.k.a. meld_dict.subtract(norm_dict)\n meld_dict == meld_res\n\n\nChangelog\n---------\n\n1.0.0\n^^^^^\nTuesday Apr 3 2018\n\n* Initial release\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/johnsca/melddict", "keywords": "", "license": "Apache 2", "maintainer": "", "maintainer_email": "", "name": "melddict", "package_url": "https://pypi.org/project/melddict/", "platform": "", "project_url": "https://pypi.org/project/melddict/", "project_urls": { "Homepage": "https://github.com/johnsca/melddict" }, "release_url": "https://pypi.org/project/melddict/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "Dictionary with recursive additive and subtractive merging", "version": "1.0.1" }, "last_serial": 3731647, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "7bbdb023b4edd4d2971d1929101cc182", "sha256": "6d0052cd23a3a75e11dbe1be4eac599ef2f2424087b54a7ec9ca7db99a1205d8" }, "downloads": -1, "filename": "melddict-1.0.0.tar.gz", "has_sig": false, "md5_digest": "7bbdb023b4edd4d2971d1929101cc182", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8042, "upload_time": "2018-04-03T20:04:03", "url": "https://files.pythonhosted.org/packages/17/ed/c028774f2d447551b9a02a0a9c195f96474e0b10305def79180f0d9d5df1/melddict-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "8bcc83a69a9099592f61ea81e73737e9", "sha256": "70ad91f4a7fb7ee32498e828604fe10c6ceb68a5779ca9d41e5469a6c24826ea" }, "downloads": -1, "filename": "melddict-1.0.1.tar.gz", "has_sig": false, "md5_digest": "8bcc83a69a9099592f61ea81e73737e9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8072, "upload_time": "2018-04-03T21:34:02", "url": "https://files.pythonhosted.org/packages/89/99/c2dd9897264764544cb02de5fe0ffc277c091e973908b0894abe8900be7a/melddict-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8bcc83a69a9099592f61ea81e73737e9", "sha256": "70ad91f4a7fb7ee32498e828604fe10c6ceb68a5779ca9d41e5469a6c24826ea" }, "downloads": -1, "filename": "melddict-1.0.1.tar.gz", "has_sig": false, "md5_digest": "8bcc83a69a9099592f61ea81e73737e9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8072, "upload_time": "2018-04-03T21:34:02", "url": "https://files.pythonhosted.org/packages/89/99/c2dd9897264764544cb02de5fe0ffc277c091e973908b0894abe8900be7a/melddict-1.0.1.tar.gz" } ] }