{ "info": { "author": "Maples7", "author_email": "maples7@163.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "=====================\ndict-recursive-update\n=====================\n\n.. image:: https://travis-ci.org/Maples7/dict-recursive-update.svg?branch=master\n :target: https://travis-ci.org/Maples7/dict-recursive-update\n\n.. image:: https://img.shields.io/pypi/v/dict-recursive-update.svg\n :target: https://pypi.python.org/pypi/dict-recursive-update\n\nA Python module who does recursive update work on 2 dicts.\n\nUsage\n=====\n\nInstallation\n------------\n\n.. code:: shell\n\n pip install dict-recursive-update\n\n\nExamples\n--------\n\n.. code:: python\n\n >>> from dict_recursive_update import recursive_update\n\n >>> recursive_update({'a': {'b': 2}}, {'a': {'b': 3, 'd': 4}, 'e': 5})\n {'a': {'b': 3, 'd': 4}, 'e': 5}\n\n >>> recursive_update('a', 'b')\n Traceback (most recent call last):\n ...\n TypeError: Params of recursive_update should be dicts\n\n >>> recursive_update({'a': [1]}, {'a': [2], 'c': {'d': {'c': 3}}})\n {'a': [2], 'c': {'d': {'c': 3}}}\n\n >>> recursive_update({'a': {'c': 1, 'd': {}}, 'b': 4}, {'b': 5})\n {'a': {'c': 1, 'd': {}}, 'b': 5}\n\n >>> recursive_update({'a': {'c': 1, 'd': {}}, 'b': 4}, {'a': 2})\n {'a': 2, 'b': 4}\n\n\nWhy?\n====\n\nThis is originally designed for merge multiple configurations in different running environment such as production or stage.\n\nAs a node.js developer, package `config `_ and `lodash `_ are very handy for me. This package is the base of `a python-version config package `_.\n\nIn a normal project, there is usually a copy of default configuration, but when we deploy it, some configurations differ from default ones like database address. So a handy configuration-loading package is supposed to load right configurations according to the running environment.\n\nLicense\n=======\n`MIT <./LICENSE.txt>`_\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Maples7/dict-recursive-update", "keywords": "dict recursive update", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "dict-recursive-update", "package_url": "https://pypi.org/project/dict-recursive-update/", "platform": "", "project_url": "https://pypi.org/project/dict-recursive-update/", "project_urls": { "Homepage": "https://github.com/Maples7/dict-recursive-update" }, "release_url": "https://pypi.org/project/dict-recursive-update/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "A Python module who does recursive update work on 2 dicts.", "version": "1.0.1" }, "last_serial": 3513786, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "87e68bebb5513fc9b2ff486e4ce52037", "sha256": "0d23fb17bc06dfdf4260b44d1c1e9a3debad176eb5b95c73eec0aac18c2cab93" }, "downloads": -1, "filename": "dict_recursive_update-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "87e68bebb5513fc9b2ff486e4ce52037", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4376, "upload_time": "2017-10-26T07:44:07", "url": "https://files.pythonhosted.org/packages/19/79/87b3a5b76228429c80448190cb453ed384cc27b8d7afe06d25c82580c44a/dict_recursive_update-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d34f146d3d627aa7f6e485b4cf973aeb", "sha256": "f24dc6e33daf4d217c7c075dfff6d0da1c1ded7bc1c110b778290e427cb934b1" }, "downloads": -1, "filename": "dict-recursive-update-1.0.0.tar.gz", "has_sig": false, "md5_digest": "d34f146d3d627aa7f6e485b4cf973aeb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2388, "upload_time": "2017-10-26T07:44:09", "url": "https://files.pythonhosted.org/packages/9b/06/8a0b9e66bb3c7ce16a926e259e70485ead1811a30fd6b9ca009f9dbd5ce7/dict-recursive-update-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "8e9d6145370f3b0050540ac5b6a1523e", "sha256": "24bfdd88ff2bf7bd85870b8c65918002638888a790f7453865bdce6f3b83f8ff" }, "downloads": -1, "filename": "dict_recursive_update-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8e9d6145370f3b0050540ac5b6a1523e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4413, "upload_time": "2018-01-23T12:14:07", "url": "https://files.pythonhosted.org/packages/88/40/2cb6ba8f04590f41bb43f5ddb50217705aa6fcb9499f424160259e7e2b8c/dict_recursive_update-1.0.1-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8e9d6145370f3b0050540ac5b6a1523e", "sha256": "24bfdd88ff2bf7bd85870b8c65918002638888a790f7453865bdce6f3b83f8ff" }, "downloads": -1, "filename": "dict_recursive_update-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8e9d6145370f3b0050540ac5b6a1523e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4413, "upload_time": "2018-01-23T12:14:07", "url": "https://files.pythonhosted.org/packages/88/40/2cb6ba8f04590f41bb43f5ddb50217705aa6fcb9499f424160259e7e2b8c/dict_recursive_update-1.0.1-py2.py3-none-any.whl" } ] }