{ "info": { "author": "Pierre Tardy", "author_email": "tardyp@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "######\ndictns\n######\n\n\n .. image:: https://travis-ci.org/tardyp/dictns.png?branch=master\n :target: https://travis-ci.org/tardyp/dictns\n\n\nsimple python class that merges dictionary and object APIs\n\nThose Namespace objects work in a similar way as javascript objects.\nintended to help deadling with deep json objects, and save you a lot of [''] in your code\n\nusage\n-----\n\n.. code-block:: python\n\n from dictns import Namespace\n n = Namespace(dict(a=1, b=3, c=dict(d=4)))\n assert(n['a'] == n.a)\n assert(n['c']['d'] == n.c.d)\n\nyou can wrap dicts and lists inside Namespace\n\n.. code-block:: python\n\n n = Namespace([dict(a=1, b=3, c=[dict(d=4)])])\n assert(n[0]['a'] == n[0].a)\n assert(n[0]['c'][0]['d'] == n[0].c[0].d)\n\nyou can also wrap dict subclasses like OrderedDict, but the resulting Namespace\ndoes not inherit original object characteristics (i.e. order in OrderedDict)\n\nsee unit tests for more usage examples\n\nChangeLog:\n\n- 1.0: Initial version\n\n- 1.1: Added Namespace comparaison tools\n\n- 1.2: Namespace now support dict and list subclasses as input\n\n- 1.3:\n - Fix for compatibility with getattr() built-in method. When an invalid key is requested, it\n now raises an AttributeError instead of a KeyError.\n - Allow initialization without arg: Namespace() is equivalent to Namespace({}).\n\n- 1.4: Allow Namespace objects to be weak referenced\n\n- 1.5:\n - Fix tests for 3.5 and pypy\n - Readme cleanups\n\nDeveloping\n----------\n\nLaunch unit tests:\n\n python test/test_namespace.py\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "http://github.com/tardyp/dictns", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/tardyp/dictns", "keywords": "dict,object", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "dictns", "package_url": "https://pypi.org/project/dictns/", "platform": "Any", "project_url": "https://pypi.org/project/dictns/", "project_urls": { "Download": "http://github.com/tardyp/dictns", "Homepage": "http://github.com/tardyp/dictns" }, "release_url": "https://pypi.org/project/dictns/1.5/", "requires_dist": null, "requires_python": "", "summary": "simple class that merge dictionary and object API", "version": "1.5" }, "last_serial": 2459030, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "e8a1a22ed83e22a61d457743934ee18b", "sha256": "a01ec608b8dd16b0945c03f6810c248a33ae10a4bfbf8b18755cc65af4518520" }, "downloads": -1, "filename": "dictns-1.0.tar.gz", "has_sig": false, "md5_digest": "e8a1a22ed83e22a61d457743934ee18b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2841, "upload_time": "2013-06-07T12:52:24", "url": "https://files.pythonhosted.org/packages/e7/14/81ccfb92ce53b0c21e698b5eb1228b0086686992566b68925d3f7de81cfa/dictns-1.0.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "2fe84697985226d3e492b1da35bdda59", "sha256": "d266d094c35b35242230bc71a547ddf41d8068235f57e762aba1228440d652d8" }, "downloads": -1, "filename": "dictns-1.2.tar.gz", "has_sig": false, "md5_digest": "2fe84697985226d3e492b1da35bdda59", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4231, "upload_time": "2014-06-01T16:37:39", "url": "https://files.pythonhosted.org/packages/66/05/1d6d2706a68c14d160f8dd159159ed8d33c02fe2a68692d8b363bf4ed6be/dictns-1.2.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "fae06cfefa5cd2930003055dd17959db", "sha256": "dffa05e409a32db9a870a39c43841a7d19f4cfccd4169c84d302db0a90f2260d" }, "downloads": -1, "filename": "dictns-1.3.tar.gz", "has_sig": false, "md5_digest": "fae06cfefa5cd2930003055dd17959db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4552, "upload_time": "2014-10-30T13:59:15", "url": "https://files.pythonhosted.org/packages/1d/4c/ea6514e12663613e777f155cbd2ccf69fed3d1c7147896f85e1569f71b4f/dictns-1.3.tar.gz" } ], "1.4": [ { "comment_text": "", "digests": { "md5": "f018be79b2b309b9bea37ec67ab8f548", "sha256": "bc0da10c36eb6da91c17b6ad01db2793f24f2b0d1835ae0dc5da12adf7c2abec" }, "downloads": -1, "filename": "dictns-1.4.tar.gz", "has_sig": false, "md5_digest": "f018be79b2b309b9bea37ec67ab8f548", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4579, "upload_time": "2014-12-14T15:14:23", "url": "https://files.pythonhosted.org/packages/38/77/a334f7b7d3e851dc62ba18e032592ebae5146877173098644fc8c56e8a23/dictns-1.4.tar.gz" } ], "1.5": [ { "comment_text": "", "digests": { "md5": "c4288e05fa15715e366f021e72a12e69", "sha256": "0af65dc05cc99a714ad1e26bfd6bf2fd869c7b95fdbc34d6a4eca38f9cf82707" }, "downloads": -1, "filename": "dictns-1.5-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "c4288e05fa15715e366f021e72a12e69", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5488, "upload_time": "2016-11-14T09:57:19", "url": "https://files.pythonhosted.org/packages/e8/e7/0b105a1814d80244e5d9b5ee1d54ccf59cb3f2d3df6b27815158e3771744/dictns-1.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4676ef3e35388529306920cebb59c090", "sha256": "87ca212898db93164fcaa2fcff968563ba8da599cc136c85a0d6aee8867d2ec5" }, "downloads": -1, "filename": "dictns-1.5.tar.gz", "has_sig": true, "md5_digest": "4676ef3e35388529306920cebb59c090", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5191, "upload_time": "2016-11-14T09:57:22", "url": "https://files.pythonhosted.org/packages/90/2f/2bb7f17294e33b5b3aad6f5a413894f70c020c44a539b50df23e87686ca6/dictns-1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c4288e05fa15715e366f021e72a12e69", "sha256": "0af65dc05cc99a714ad1e26bfd6bf2fd869c7b95fdbc34d6a4eca38f9cf82707" }, "downloads": -1, "filename": "dictns-1.5-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "c4288e05fa15715e366f021e72a12e69", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5488, "upload_time": "2016-11-14T09:57:19", "url": "https://files.pythonhosted.org/packages/e8/e7/0b105a1814d80244e5d9b5ee1d54ccf59cb3f2d3df6b27815158e3771744/dictns-1.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4676ef3e35388529306920cebb59c090", "sha256": "87ca212898db93164fcaa2fcff968563ba8da599cc136c85a0d6aee8867d2ec5" }, "downloads": -1, "filename": "dictns-1.5.tar.gz", "has_sig": true, "md5_digest": "4676ef3e35388529306920cebb59c090", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5191, "upload_time": "2016-11-14T09:57:22", "url": "https://files.pythonhosted.org/packages/90/2f/2bb7f17294e33b5b3aad6f5a413894f70c020c44a539b50df23e87686ca6/dictns-1.5.tar.gz" } ] }