{ "info": { "author": "Alex Couper", "author_email": "info@alexcouper.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", "Operating System :: OS Independent", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "supermutes\n==========\n\nThis library works with python 2.6, 2.7 and 3.2.\n\nIt defines three kinds of mutables.\n\ndot\n---\n\nThe ``dot`` module contains classes that allow dot-notation to be used for\nwhen accessing a ``list`` or ``dict`` object.\n\neg::\n\n >> from supermutes.dot import dotify\n >> d = dotify({'a':[1, 2, 3, 4, 5], 'b': {'c': 5}})\n >> d.a._0\n 1\n >> d.b.c\n 5\n >> d.c = {'f': 9}\n >> d.c.f\n 9\n\nreadonly\n--------\n\nThe ``readonly`` module contains classes that transform ``dict`` and ``list``\nobjects into ones that cannot have any values changed on them.\n\neg::\n\n >> from supermutes.readonly import readonly\n >> r = readonly({'a':[1, 2, 3, 4, 5], 'b': {'c': 5}})\n >> r\n {'a': [1, 2, 3, 4, 5], 'b': {'c': 5}}\n >> r['a'].append(5)\n supermutes.readonly.ReadOnlyClassException: Cannot write to object.\n >> r['b']['d'] = 6\n supermutes.readonly.ReadOnlyClassException: Cannot write to object.\n\nA decorator function is also available for readonly objects. It will\nreadonly-fy the output of the decorated function/method\n\neg::\n\n from supermutes.decorators import return_readonly\n\n @return_readonly\n def get_list():\n return ['12']\n\n\nOrderedDefaultDict\n------------------\n\nThe ``ordered`` module contains the ``OrderedDefaultDict`` class. It is an\nimplementation that is meant to be the child of an ``OrderedDict`` and a\n``defaultdict`` from the python standard library.\n\n\nCreating Sub Classes\n--------------------\n\nUpon declaration of a sub class of any of the supermutes, that class will be\nset as the defacto class for recursively changing data sets.\n\nTo reset the classes back to the original set, use the ``reset_mapping`` method\ninside the module\n\neg::\n\n >>> from supermutes.dot import DotDict, DotList, reset_mapping\n >>> class MySubClass(DotDict): pass\n >>> d = MySubClass({'a': {'b': {'c': 3}}})\n >>> d.a.b\n {'c': 3}\n >>> d.a.b.__class__\n \n >>> f = DotList([1, {}])\n >>> f[1].__class__\n \n >>> reset_mapping()\n >>> f = DotList([1, {}])\n >>> f[1].__class__\n \n\n\nWriting your own ``Supermutable``\n---------------------------------\n\nIf you would like to contribute, and write a supermutable that behaves in a\nparticular fashion, just try to follow these guidelines:\n\n * It should inherit from the mutable type that it is adapting (eg ``dict``\n ``list`` etc.)\n * It should also inherit from ``base.SuperMutable``. This takes care of\n all of the registering of any subclasses so that for example, all sub\n dicts added to the SuperMutable are changed accordingly. See example.py\n for a working sample.\n\n\nBuilding\n--------\n\nAfter cloning the repo::\n\n $ pip install -r test-requirements.txt\n $ nosetests\n\n``supermutes`` has a build job at http://travis-ci.org/alexcouper/supermutes", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/alexcouper/supermutes", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "supermutes", "package_url": "https://pypi.org/project/supermutes/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/supermutes/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/alexcouper/supermutes" }, "release_url": "https://pypi.org/project/supermutes/0.2.5/", "requires_dist": null, "requires_python": null, "summary": "A collection of super mutables", "version": "0.2.5" }, "last_serial": 1084795, "releases": { "0.1.3": [ { "comment_text": "", "digests": { "md5": "ba7fc341cf8d97ec9ebc2682946ba55c", "sha256": "1bb56665acea90b78cf3b934fc62f706ae9d887a086bea0acac1f7a66c8e0962" }, "downloads": -1, "filename": "supermutes-0.1.3.tar.gz", "has_sig": false, "md5_digest": "ba7fc341cf8d97ec9ebc2682946ba55c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2947, "upload_time": "2012-07-19T01:37:56", "url": "https://files.pythonhosted.org/packages/bf/93/3e314cca3f546ca97c05c3765ab511a91aec49052ef0b3f639c52cbfc3b2/supermutes-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "24dcc56caec0a7d6941d3ebeff705fd1", "sha256": "c1f4de571109f11eb2d79f474a29594617a5b04b1bfa5e52699e3cb0dee0d036" }, "downloads": -1, "filename": "supermutes-0.1.4.tar.gz", "has_sig": false, "md5_digest": "24dcc56caec0a7d6941d3ebeff705fd1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3129, "upload_time": "2012-07-19T11:20:59", "url": "https://files.pythonhosted.org/packages/47/89/c15f533217c829294f4d8ad791b17f4261c76bae34b208c422dd879fcc69/supermutes-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "f486c735fbf52d9912ff985e9c6574de", "sha256": "1ecfa4a1d60477ab8d783a2a326bb8f721fdbe619421983ae860c0cbc462badd" }, "downloads": -1, "filename": "supermutes-0.1.5.tar.gz", "has_sig": false, "md5_digest": "f486c735fbf52d9912ff985e9c6574de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3265, "upload_time": "2012-07-19T11:45:41", "url": "https://files.pythonhosted.org/packages/1a/1a/d8ef31623d33dec0ec702fd24e2b42b4148be939fbec5eced514c6287318/supermutes-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "f72f0fa847e19f5da5a71379d5bf3bb9", "sha256": "14cc1e974c02b6ab632f0ec91bedc26f96c29c74f807b5559700a26ed8910b57" }, "downloads": -1, "filename": "supermutes-0.1.6.tar.gz", "has_sig": false, "md5_digest": "f72f0fa847e19f5da5a71379d5bf3bb9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3367, "upload_time": "2012-07-19T19:44:37", "url": "https://files.pythonhosted.org/packages/05/f1/63526dc22fcf5cb12ca96bdb0fa020710f0611679a5eab92fe9bb78d9fd2/supermutes-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "e5b02511f54adfdec693bf90aba9120b", "sha256": "a3257f1c6925ba0be68cc05c057e81719b08fbea8a7614fdc57b4ddc717ce021" }, "downloads": -1, "filename": "supermutes-0.1.7.tar.gz", "has_sig": false, "md5_digest": "e5b02511f54adfdec693bf90aba9120b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3796, "upload_time": "2012-07-20T18:47:25", "url": "https://files.pythonhosted.org/packages/0c/c8/f9e1c217aa54b1a9606e7d1534a27e99228b960e0d72e7fc93a052ebd37a/supermutes-0.1.7.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "352bf8c8c281c8b7aef23bd59b25569a", "sha256": "6ab5fff33591ca41efa70320ba22ecf58da291f647f72687f9f075876fd70bce" }, "downloads": -1, "filename": "supermutes-0.2.0.tar.gz", "has_sig": false, "md5_digest": "352bf8c8c281c8b7aef23bd59b25569a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4281, "upload_time": "2012-07-20T19:21:03", "url": "https://files.pythonhosted.org/packages/a4/5f/9a343b0ce72b4d8d2777c468c439a3ac347f4113c4f794516b9436f58e6d/supermutes-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "49950c61dc801714969df558313319ec", "sha256": "38240659711d79c4968886ffb32b259202b83d8810530d2c581655d563fd810a" }, "downloads": -1, "filename": "supermutes-0.2.1.tar.gz", "has_sig": false, "md5_digest": "49950c61dc801714969df558313319ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4333, "upload_time": "2012-07-24T12:05:48", "url": "https://files.pythonhosted.org/packages/93/99/38801b1ac81de2b51a4ff89abac581288ac72cf7fd587662745c6814e65e/supermutes-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "3db01f80b5b811739a0084363e86a6f9", "sha256": "ac4a99b5d341327504141400c7d92b1bb8d29598d0b0e04b4d6f2f9d3b2cc0d4" }, "downloads": -1, "filename": "supermutes-0.2.2.tar.gz", "has_sig": false, "md5_digest": "3db01f80b5b811739a0084363e86a6f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4848, "upload_time": "2012-07-24T14:17:57", "url": "https://files.pythonhosted.org/packages/46/13/f3102d82d5346e6a01d00364d1ba6079d0d4bbff090869419bd7c00ca2c1/supermutes-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "02215617020244758c82851c64ad6434", "sha256": "8bb0dbcff1d8a7fb92d54b5741e6699f9afe6b24aabe5aba9f22aa3e983e0484" }, "downloads": -1, "filename": "supermutes-0.2.3.tar.gz", "has_sig": false, "md5_digest": "02215617020244758c82851c64ad6434", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4738, "upload_time": "2012-07-24T15:53:18", "url": "https://files.pythonhosted.org/packages/d3/2f/c1cc0236139888e46daeee8747479a497ee452f58196f4ca501fff5a422a/supermutes-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "b0dbf2404b03dcf36c004ddce12216ee", "sha256": "4a169372338e4e0ead532abd358b117443e5cb424cfa0b7f2752df345542521e" }, "downloads": -1, "filename": "supermutes-0.2.4.tar.gz", "has_sig": false, "md5_digest": "b0dbf2404b03dcf36c004ddce12216ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4952, "upload_time": "2012-07-25T10:33:19", "url": "https://files.pythonhosted.org/packages/da/74/81256ed0f4402eba1efa55fd54be23c769e1b24086083480128dc9b26196/supermutes-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "63ca1d73f9850cbdcd40b6ab5eb3fa4b", "sha256": "c4a3f9699c48df241d08eab218796e3056af78fafcf41bc2b0ddfe23d64831e4" }, "downloads": -1, "filename": "supermutes-0.2.5.tar.gz", "has_sig": false, "md5_digest": "63ca1d73f9850cbdcd40b6ab5eb3fa4b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5335, "upload_time": "2014-05-07T23:54:53", "url": "https://files.pythonhosted.org/packages/3f/dd/e392bad8476734ec489278c24047c19feaf3ba8e04a7219b5520e6112b1b/supermutes-0.2.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "63ca1d73f9850cbdcd40b6ab5eb3fa4b", "sha256": "c4a3f9699c48df241d08eab218796e3056af78fafcf41bc2b0ddfe23d64831e4" }, "downloads": -1, "filename": "supermutes-0.2.5.tar.gz", "has_sig": false, "md5_digest": "63ca1d73f9850cbdcd40b6ab5eb3fa4b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5335, "upload_time": "2014-05-07T23:54:53", "url": "https://files.pythonhosted.org/packages/3f/dd/e392bad8476734ec489278c24047c19feaf3ba8e04a7219b5520e6112b1b/supermutes-0.2.5.tar.gz" } ] }