{ "info": { "author": "Fahrzin Hemmati", "author_email": "fahhem@chainreactionmfg.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Utilities" ], "description": "mutablerecords.Record\n---------------------\n\nThis is similar to collections.namedtuple, except it supports optional\nattributes and mutability. A class definition is generated (with\n\\_\\_slots\\_\\_, \\_\\_str\\_\\_ and other niceties), and can be used to\ninstantiate new records of that type. The record can also be subclassed\nto add new attributes or to add methods to that data.\n\nSometimes, a Record definition is used to replace a simple \\_\\_init\\_\\_\nmethod that only takes N arguments and sets them as instance variables.\nThese \\_\\_init\\_\\_ methods are tedious to write and, even if you do, you\nstill have to write str, hash, eq functions, and set \\_\\_slots\\_\\_ to be\nfully correct, but who has the time for that? With records, you get all\nof that in a single declaration, which you can even inline as your base\nclass.\n\n.. code:: python\n\n # This acts like a mutable namedtuple, taking the same arguments.\n Simple = mutablerecords.Record('Simple', ['foo'])\n\n # Now let's use a default argument.\n SecondRecord = mutablerecords.Record('SecondRecord', ['attr1', 'attr2'], {'attr3': 0})\n foo = SecondRecord(1, 2, attr3=3)\n # str(foo) --> 'SecondRecord(attr1=1, attr2=2, attr3=3)'\n bar = SecondRecord(attr1=1, attr2=2, attr3=5)\n # str(bar) --> 'SecondRecord(attr1=1, attr2=2, attr3=5)'\n\n class Third(SecondRecord):\n required_attributes = ['third1']\n optional_attributes = {'third2': 5}\n\n # Third requires attr1, attr2, and third1.\n baz = Third(1, 2, 3, third2=4)\n # Here, second1 is required, so it goes before attr3:\n # str(baz) --> 'Third(attr1=1, attr2=2, third1=3, attr3=0, third2=5)'\n\n class OptionalMaker(mutablerecords.Record('Required', ['required'])):\n required = None\n required_attributes = ['other']\n\n opt = OptionalMaker(1)\n # OptionalMaker has a class attribute that matches the name of a\n # required_attribute (required), so it becomes an optional_attribute with a\n # default equal to the attribute value (None). It also defines a new\n # required attribute 'other', which is set in opt as 1:\n # str(opt) --> 'OptionalMaker(other=1, required=None)'\n opt2 = OptionalMaker(2, required=3)\n # This time, opt2 has required set, too, which is still an attribute.\n # str(opt2) --> 'OptionalMaker(other=2, required=3)'\n\nmutablerecords.HashableRecord\n-----------------------------\n\nAll this does is add a \\_\\_hash\\_\\_ implementation for when the record\nwill be hashed, such as when a key in a ``dict`` or in a ``set``.\n\nmutablerecords.CopyRecord\n-------------------------\n\nThis will copy a record and all of its fields. If a field is set to a\nRecord instance, then it is also copied using ``CopyRecord``. A future\nfeature may also check for collections of Records, such as tuples or\nlists of instances, and recurse into those as well.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/chainreactionmfg/mutablerecords", "keywords": "", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "mutablerecords", "package_url": "https://pypi.org/project/mutablerecords/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/mutablerecords/", "project_urls": { "Homepage": "https://github.com/chainreactionmfg/mutablerecords" }, "release_url": "https://pypi.org/project/mutablerecords/0.4.1/", "requires_dist": null, "requires_python": "", "summary": "Mutable records", "version": "0.4.1" }, "last_serial": 2277849, "releases": { "0.2.2": [ { "comment_text": "", "digests": { "md5": "73cb78ff5d765667af96f49187888ef7", "sha256": "f07cc348b4eeb210967987b52d1a032e0de03962598937e25d776cfc95c5b25d" }, "downloads": -1, "filename": "mutablerecords-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "73cb78ff5d765667af96f49187888ef7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6406, "upload_time": "2015-03-03T08:33:15", "url": "https://files.pythonhosted.org/packages/79/8e/8c8e7b04cbd6f74f2406413065102b32729d49b02078be04060a30a3f232/mutablerecords-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3de004df1a6cf162f97da7d0fe6f7f88", "sha256": "0262bd1d0bc51d653b467ecd6f4179ae08ed0095a15562830bf06b79d5b0e400" }, "downloads": -1, "filename": "mutablerecords-0.2.2.tar.gz", "has_sig": false, "md5_digest": "3de004df1a6cf162f97da7d0fe6f7f88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4303, "upload_time": "2015-03-03T08:33:19", "url": "https://files.pythonhosted.org/packages/31/62/1fd2a1004ec79ba2249af284bc4d5fcdaf9c351056e19375cbea69f4319b/mutablerecords-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "c999f4d83d5c1d0849e150ed940858b1", "sha256": "0b72d57db8290e08a450ba0998d5770400c9ef6af2691da40fb7dbee5850b3fc" }, "downloads": -1, "filename": "mutablerecords-0.2.3-py2-none-any.whl", "has_sig": false, "md5_digest": "c999f4d83d5c1d0849e150ed940858b1", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6370, "upload_time": "2015-09-23T05:48:37", "url": "https://files.pythonhosted.org/packages/4f/7c/6295798559a41cd650c901551c8612c9c666b8e6fc29f0a501d1b8adc65b/mutablerecords-0.2.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eced979198a40b7421d7252bdadb4b1d", "sha256": "570ea9703a9e97c770499b25ca882680faa219f84d6fb3af3ea14b4e267ca204" }, "downloads": -1, "filename": "mutablerecords-0.2.3.tar.gz", "has_sig": false, "md5_digest": "eced979198a40b7421d7252bdadb4b1d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4236, "upload_time": "2015-09-23T05:48:41", "url": "https://files.pythonhosted.org/packages/f4/02/e0fa62d2ce99062b1fa266153b7e6ee2fa70e255b622fe90548a530006b1/mutablerecords-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "fc45e08039e94d59af9be1bcf38e6b86", "sha256": "b696aa7c15159d2a6938212ea2ba8f9fdaa445a3a4fe73d4c67f5dbc47494ba4" }, "downloads": -1, "filename": "mutablerecords-0.2.4-py2-none-any.whl", "has_sig": false, "md5_digest": "fc45e08039e94d59af9be1bcf38e6b86", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6426, "upload_time": "2015-09-23T06:11:37", "url": "https://files.pythonhosted.org/packages/be/5f/6312e64c1e3a014472849952ad69428589b848e50ed7307077110da09242/mutablerecords-0.2.4-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4e53ef8019eeb4871bb53b87534e1ab2", "sha256": "2dab5be382a7785dac8c3636024ba3096705e101ac31a79442a1bc7e41253e71" }, "downloads": -1, "filename": "mutablerecords-0.2.4.tar.gz", "has_sig": false, "md5_digest": "4e53ef8019eeb4871bb53b87534e1ab2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4353, "upload_time": "2015-09-23T06:11:42", "url": "https://files.pythonhosted.org/packages/18/3b/a5ef373aa09a7110396a06d82848f3c2dbcac1b26116deab26ada5ca4ae0/mutablerecords-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "69009bccdd7c0cee28f33fb71f244f68", "sha256": "a333b05e3c9ddf3111dff0e9eab4fe5e6a26d2e91bf8d95a5e6e222b0af4a3ac" }, "downloads": -1, "filename": "mutablerecords-0.2.5-py2-none-any.whl", "has_sig": false, "md5_digest": "69009bccdd7c0cee28f33fb71f244f68", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6374, "upload_time": "2015-12-02T10:11:18", "url": "https://files.pythonhosted.org/packages/7d/13/997d1bab84092cfa2fc188dd45b49c938bf966f0706e1b23910ba3f08a1d/mutablerecords-0.2.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b1d6c252570ff4725dbb1b6d40423c40", "sha256": "89e2214c43a654ab7c39ef3fe08095ca691450c2b3e4914d80292582e5161ecf" }, "downloads": -1, "filename": "mutablerecords-0.2.5.tar.gz", "has_sig": false, "md5_digest": "b1d6c252570ff4725dbb1b6d40423c40", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4251, "upload_time": "2015-12-02T10:11:34", "url": "https://files.pythonhosted.org/packages/b2/62/1441eb22c1ea2f5e3361dd02e542e7d446ca7376bf3dca7ce64e2f4edd8d/mutablerecords-0.2.5.tar.gz" } ], "0.2.6": [ { "comment_text": "", "digests": { "md5": "b886658cbaf6b8470e1aacea999c75ad", "sha256": "9768b151c0318af8b7fa76ccdddf5aa27354737683190b03adf4be62ba5ad4e6" }, "downloads": -1, "filename": "mutablerecords-0.2.6-py2-none-any.whl", "has_sig": false, "md5_digest": "b886658cbaf6b8470e1aacea999c75ad", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6432, "upload_time": "2015-12-02T10:19:04", "url": "https://files.pythonhosted.org/packages/86/5e/36b8f89e081d194ab096f981e225f6c643c64df73ad6f63c2987640df577/mutablerecords-0.2.6-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b8b35a59ac37a08ef92bf4772feef071", "sha256": "3fb92f984caecf81075ab09b6c16f855ecbd573ff0f650d497ad0858f0b6602e" }, "downloads": -1, "filename": "mutablerecords-0.2.6.tar.gz", "has_sig": false, "md5_digest": "b8b35a59ac37a08ef92bf4772feef071", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4347, "upload_time": "2015-12-02T10:19:12", "url": "https://files.pythonhosted.org/packages/0f/98/804d3e5cc5400787da8160cdfedb1400f902e298b6f99625ae0272a6104b/mutablerecords-0.2.6.tar.gz" } ], "0.2.7": [ { "comment_text": "", "digests": { "md5": "523cf9e6c33173a697685f7df569cec7", "sha256": "77525889684a1c7bfc1fa4c6707699f5181a5322ed15cc7836af78df83c33cb0" }, "downloads": -1, "filename": "mutablerecords-0.2.7-py2-none-any.whl", "has_sig": false, "md5_digest": "523cf9e6c33173a697685f7df569cec7", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6576, "upload_time": "2016-03-11T05:05:52", "url": "https://files.pythonhosted.org/packages/0f/1a/a603fe2ee682268496098611ddf9d2c1cd53ee9439a980e13b78a8ae7bfa/mutablerecords-0.2.7-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "392fe3e1d738c355370378802c06a47d", "sha256": "7337d3d00be8a9c0e1acc15ae10b523b0457f5f16b7a33151b9465846f09120d" }, "downloads": -1, "filename": "mutablerecords-0.2.7.tar.gz", "has_sig": false, "md5_digest": "392fe3e1d738c355370378802c06a47d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4506, "upload_time": "2016-03-11T05:05:58", "url": "https://files.pythonhosted.org/packages/a4/cc/84cc7dff8a0dcad9a1aa64405726f381b416e0dfca167a544b4c2349aa45/mutablerecords-0.2.7.tar.gz" } ], "0.2.8": [ { "comment_text": "", "digests": { "md5": "0f05aa189720d30462c9bcde9582afb4", "sha256": "436076fb283ae573ecb96c4196043da1244d138203713b72c56f1676ae2fd84c" }, "downloads": -1, "filename": "mutablerecords-0.2.8-py2-none-any.whl", "has_sig": false, "md5_digest": "0f05aa189720d30462c9bcde9582afb4", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7420, "upload_time": "2016-04-11T22:33:09", "url": "https://files.pythonhosted.org/packages/da/08/3150c3c4575dce34c0f8f7114905a3a630e3d3364def8a278c6b375b9899/mutablerecords-0.2.8-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4279369ee8cf1f4dec9bb97a988cb784", "sha256": "4edcbb2a2642b064b43174edc302bba5fb0a6cd7214a2e58ca3bb31757922542" }, "downloads": -1, "filename": "mutablerecords-0.2.8.tar.gz", "has_sig": false, "md5_digest": "4279369ee8cf1f4dec9bb97a988cb784", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5257, "upload_time": "2016-04-11T22:33:19", "url": "https://files.pythonhosted.org/packages/bd/ae/6277767046e9e4b32c547f7d14114585863bec1735ab2864c5bea0c6eca2/mutablerecords-0.2.8.tar.gz" } ], "0.2.9": [ { "comment_text": "", "digests": { "md5": "46558f64a35cdf36875adcbb327892e0", "sha256": "37238d0be3c25fdfa28ad4cb48ba07741c352bd91cdf17037cc285b1ac055500" }, "downloads": -1, "filename": "mutablerecords-0.2.9-py2-none-any.whl", "has_sig": false, "md5_digest": "46558f64a35cdf36875adcbb327892e0", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7439, "upload_time": "2016-04-12T20:11:55", "url": "https://files.pythonhosted.org/packages/e8/34/267aeaa9234af353c4124dfacf141836de4777d2a45cc707069a474c77c5/mutablerecords-0.2.9-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "16ddee0f9c20b9261ea7acea51c01145", "sha256": "90978bd1481b557451eeeb03104eeddb61b1a0f24549fcc8bb6d226125d1b948" }, "downloads": -1, "filename": "mutablerecords-0.2.9.tar.gz", "has_sig": false, "md5_digest": "16ddee0f9c20b9261ea7acea51c01145", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5302, "upload_time": "2016-04-12T20:12:00", "url": "https://files.pythonhosted.org/packages/16/0a/8c0ba3e639b3a8aaaaba0c09eb27d800ea28d1aeac684008a9eea4822b73/mutablerecords-0.2.9.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "bf585252de21a3df416fd217fe89f4d5", "sha256": "f3b502080afa3368e35e762fa03f3fba7fbe54d7a677775b176e480ad7c936cd" }, "downloads": -1, "filename": "mutablerecords-0.3.0-py2-none-any.whl", "has_sig": false, "md5_digest": "bf585252de21a3df416fd217fe89f4d5", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7184, "upload_time": "2016-07-28T03:51:02", "url": "https://files.pythonhosted.org/packages/43/e0/6206e63422509c70dd8117683c12915acebfa357bfde7c31f7f1697ed909/mutablerecords-0.3.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e99e143f797840d99f9eec7258fbaa5e", "sha256": "d767869fabd912b98f31d419b4c4e63cd04cbb669165c869f42f43654bc55934" }, "downloads": -1, "filename": "mutablerecords-0.3.0.tar.gz", "has_sig": false, "md5_digest": "e99e143f797840d99f9eec7258fbaa5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5043, "upload_time": "2016-07-28T03:51:05", "url": "https://files.pythonhosted.org/packages/42/b5/dc0df76ef309d689dff55c23c8e5e72f4166ff8606fe95fc4d4edc04851f/mutablerecords-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "84f399aaed4921a58e46d392d149d250", "sha256": "fa5cba7e120c6d53bffc002393ecb180f86694cd44733b0fb664473843c9abe6" }, "downloads": -1, "filename": "mutablerecords-0.4.0-py2-none-any.whl", "has_sig": false, "md5_digest": "84f399aaed4921a58e46d392d149d250", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7211, "upload_time": "2016-08-12T11:39:50", "url": "https://files.pythonhosted.org/packages/70/a9/44974a9f9bd38d9e90b7320a83e91a8d9c1daf347e500cdcbd3d4a8870c6/mutablerecords-0.4.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0eb9acf143e03956dae650b158de348a", "sha256": "9261da729e9f8ca2164f1d222f4d212e5b6e118d1b270119529e2ad3e4f58d01" }, "downloads": -1, "filename": "mutablerecords-0.4.0.tar.gz", "has_sig": false, "md5_digest": "0eb9acf143e03956dae650b158de348a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5056, "upload_time": "2016-08-12T11:39:52", "url": "https://files.pythonhosted.org/packages/1f/6b/078ab18b6a932ba675b3c4862563ef4b81236855fd9137afd72431382db8/mutablerecords-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "88c1752635ab69f0c95dd72d556e9899", "sha256": "524ed0d33f369bce83265a7b0948405b0becc1f1bcf1c5c9d9195486cad4541b" }, "downloads": -1, "filename": "mutablerecords-0.4.1-py2-none-any.whl", "has_sig": false, "md5_digest": "88c1752635ab69f0c95dd72d556e9899", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7222, "upload_time": "2016-08-12T11:53:34", "url": "https://files.pythonhosted.org/packages/22/43/113bb709a13d8e304748be4bebfc755cdc37b4bf7793fae624d26935ad7e/mutablerecords-0.4.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0b03f49a0d1e01572b9c1edf0d4cc581", "sha256": "be54b2688c87126866fc52414bd1f10d6e2943f79bf92665fec95399252108b4" }, "downloads": -1, "filename": "mutablerecords-0.4.1.tar.gz", "has_sig": false, "md5_digest": "0b03f49a0d1e01572b9c1edf0d4cc581", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5070, "upload_time": "2016-08-12T11:53:36", "url": "https://files.pythonhosted.org/packages/db/20/905640389fa42372d6c5200a6bb7a919511ef4669fd50203e05e6805479e/mutablerecords-0.4.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "88c1752635ab69f0c95dd72d556e9899", "sha256": "524ed0d33f369bce83265a7b0948405b0becc1f1bcf1c5c9d9195486cad4541b" }, "downloads": -1, "filename": "mutablerecords-0.4.1-py2-none-any.whl", "has_sig": false, "md5_digest": "88c1752635ab69f0c95dd72d556e9899", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7222, "upload_time": "2016-08-12T11:53:34", "url": "https://files.pythonhosted.org/packages/22/43/113bb709a13d8e304748be4bebfc755cdc37b4bf7793fae624d26935ad7e/mutablerecords-0.4.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0b03f49a0d1e01572b9c1edf0d4cc581", "sha256": "be54b2688c87126866fc52414bd1f10d6e2943f79bf92665fec95399252108b4" }, "downloads": -1, "filename": "mutablerecords-0.4.1.tar.gz", "has_sig": false, "md5_digest": "0b03f49a0d1e01572b9c1edf0d4cc581", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5070, "upload_time": "2016-08-12T11:53:36", "url": "https://files.pythonhosted.org/packages/db/20/905640389fa42372d6c5200a6bb7a919511ef4669fd50203e05e6805479e/mutablerecords-0.4.1.tar.gz" } ] }