{ "info": { "author": "Samuel Jaillet", "author_email": "sam+dev@samjy.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: Freely Distributable", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development" ], "description": "***************************\nsloot.object - Object tools\n***************************\n\n.. image:: https://travis-ci.org/samjy/sloot.object.svg?branch=master\n :target: https://travis-ci.org/samjy/sloot.object\n\n\nBasic usage\n===========\n\n::\n\n >>> from sloot.object import dictobj\n >>> d = dictobj({'a': 'a', 'b': 'b'}, c='c')\n >>> print(d)\n dictobj({'a': 'a', 'b': 'b', 'c': 'c'})\n >>> d.a\n 'a'\n >>> d['a']\n 'a'\n >>> d.a = 3\n >>> d.a\n 3\n >>> d['a'] = 42\n >>> d.a\n 42\n >>> print(d)\n dictobj({'a': 42, 'c': 'c', 'b': 'b'})\n >>> print(dict(d))\n {'a': 42, 'c': 'c', 'b': 'b'}\n\n\n\nBehavior of setattr in inherited objects\n========================================\n\n::\n\n >>> class T(dictobj):\n ... classvar = 'classvar'\n ... def f(self):\n ... return 'f'\n ... @property\n ... def prop(self):\n ... return getattr(self, '_prop', 'prop')\n ... @prop.setter\n ... def prop(self, value):\n ... self._prop = value\n ...\n\n\n- methods and class attributes are not overwritten and go to the dict::\n\n >>> t = T({'classvar': 1, 'f': 2, 'prop': 3})\n >>> t.classvar # access the class attribute\n 'classvar'\n >>> t['classvar'] # access the dict entry\n 1\n >>> t.classvar = 5 # we don't overwrite class attributes, this goes to dict\n >>> t.classvar # this is the class attribute\n 'classvar'\n >>> t['classvar']\n 5\n >>> t.f # access the class method\n \n >>> t['f'] # access the dict entry\n 2\n >>> t.f = 4 # we don't overwrite the method, this goes to the dict\n >>> t.f\n \n >>> t['f']\n 4\n\n- properties getter and setter are used::\n\n >>> t.prop # get the property\n 'prop'\n >>> t['prop'] # get the dict entry\n 3\n >>> t.prop = 'newprop' # use property setter\n >>> t.prop\n 'newprop'\n >>> t['prop']\n 3\n\n- otherwise the dict is updated::\n\n >>> t.a = 42\n >>> t['a']\n 42\n >>> t.a\n 42\n\n\n.. EOF\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "https://github.com/samjy/sloot.object/tarball/1.4.0", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/samjy/sloot.object", "keywords": "tools,object,utils,dict", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "sloot.object", "package_url": "https://pypi.org/project/sloot.object/", "platform": "any", "project_url": "https://pypi.org/project/sloot.object/", "project_urls": { "Download": "https://github.com/samjy/sloot.object/tarball/1.4.0", "Homepage": "https://github.com/samjy/sloot.object" }, "release_url": "https://pypi.org/project/sloot.object/1.4.0/", "requires_dist": null, "requires_python": "", "summary": "Object utils to make life easier", "version": "1.4.0" }, "last_serial": 5453407, "releases": { "1.1.0": [ { "comment_text": "", "digests": { "md5": "e94b1cbbfad7da075407820dc081c236", "sha256": "8f26bc14b14cf24d706f3de35fac201361b259c01c0b2063dce5bac3f7615913" }, "downloads": -1, "filename": "sloot.object-1.1.0.tar.gz", "has_sig": false, "md5_digest": "e94b1cbbfad7da075407820dc081c236", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3006, "upload_time": "2016-04-09T10:03:03", "url": "https://files.pythonhosted.org/packages/9a/e5/e9de430546383aea793015d6fc529bc7e7c203f1c5a23a0b5d3a98d74dad/sloot.object-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "78c60cbf94d413f1b87e742b0c49dad3", "sha256": "0956b12e3f3433b18d4674312bd1bff4801a2755abc1a198012827b02ef624ae" }, "downloads": -1, "filename": "sloot.object-1.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "78c60cbf94d413f1b87e742b0c49dad3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4841, "upload_time": "2017-09-13T21:19:21", "url": "https://files.pythonhosted.org/packages/90/12/783524a90763546e819aec7be23b6f1a794ee80b467757ccf0f77d2456fe/sloot.object-1.2.0-py2.py3-none-any.whl" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "30f4d4cd142c7bed8f63009f703992ee", "sha256": "22a5c0a7c28f727d4abc29c5b79919e830a1c860e7e335b1ed73939fd2706bf4" }, "downloads": -1, "filename": "sloot.object-1.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "30f4d4cd142c7bed8f63009f703992ee", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4842, "upload_time": "2017-09-13T21:24:46", "url": "https://files.pythonhosted.org/packages/da/f3/f540eeae07b1855da2bf99aaaaeac76cde22cf046daeaae65629f47cbf95/sloot.object-1.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "96260d06c9928b983022313c2d988bd7", "sha256": "cfb619e3dc1e7c1e3bb25f4a8759ccbd4b6bff1988c2138ca9d85b59995f03cc" }, "downloads": -1, "filename": "sloot.object-1.2.1.tar.gz", "has_sig": false, "md5_digest": "96260d06c9928b983022313c2d988bd7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4162, "upload_time": "2017-09-13T21:24:48", "url": "https://files.pythonhosted.org/packages/6d/50/e1381ace04f78f34112959d5e8d1827455495fc2994da8f1d4029cd61154/sloot.object-1.2.1.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "090a3c6c626a6e8f1e5a2622fd33d82c", "sha256": "1c5e2d39b4a99f5fbdc1f1c14b01aa9a964d4c118b56608194fd7eded7af6e97" }, "downloads": -1, "filename": "sloot.object-1.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "090a3c6c626a6e8f1e5a2622fd33d82c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5777, "upload_time": "2019-06-25T17:01:35", "url": "https://files.pythonhosted.org/packages/55/bc/5c17d95420351befe05426260f7cf6b555742ec591bffe049a276c985b2a/sloot.object-1.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1eea327b8b9f0699a05c5541e9964324", "sha256": "cd78afe3c8d055eec937b33e5e84f565b73c88dfb04114edde3f46d2789031ca" }, "downloads": -1, "filename": "sloot.object-1.3.0.tar.gz", "has_sig": false, "md5_digest": "1eea327b8b9f0699a05c5541e9964324", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4789, "upload_time": "2019-06-25T17:01:37", "url": "https://files.pythonhosted.org/packages/09/6d/f7447c5efd91fc279223c49bb74d34d14c98b0db53210a794f2b023feb59/sloot.object-1.3.0.tar.gz" } ], "1.4.0": [ { "comment_text": "", "digests": { "md5": "42c1585918c257b3b8d1fa8410d63e8a", "sha256": "ac2908c0d50de3501129db484576f900fb3717e6527c46a1943e9b08b0c8167d" }, "downloads": -1, "filename": "sloot.object-1.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "42c1585918c257b3b8d1fa8410d63e8a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5943, "upload_time": "2019-06-26T19:43:43", "url": "https://files.pythonhosted.org/packages/d6/1e/b69eed7fc9958dad658bebe0c8acb4f6c28df02f37223514adecc85ede76/sloot.object-1.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b434a3bf071f6f0b7bb3f351f3bb06ef", "sha256": "753028622f39e0713f00033a9d6ab54e5d7e2fa3ce752161176e6b6fa598b4d9" }, "downloads": -1, "filename": "sloot.object-1.4.0.tar.gz", "has_sig": false, "md5_digest": "b434a3bf071f6f0b7bb3f351f3bb06ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4959, "upload_time": "2019-06-26T19:43:45", "url": "https://files.pythonhosted.org/packages/d3/1f/1171fa448ff835f2f90183714c6d5f58834b197dfbbce2b5610d5be017a7/sloot.object-1.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "42c1585918c257b3b8d1fa8410d63e8a", "sha256": "ac2908c0d50de3501129db484576f900fb3717e6527c46a1943e9b08b0c8167d" }, "downloads": -1, "filename": "sloot.object-1.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "42c1585918c257b3b8d1fa8410d63e8a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5943, "upload_time": "2019-06-26T19:43:43", "url": "https://files.pythonhosted.org/packages/d6/1e/b69eed7fc9958dad658bebe0c8acb4f6c28df02f37223514adecc85ede76/sloot.object-1.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b434a3bf071f6f0b7bb3f351f3bb06ef", "sha256": "753028622f39e0713f00033a9d6ab54e5d7e2fa3ce752161176e6b6fa598b4d9" }, "downloads": -1, "filename": "sloot.object-1.4.0.tar.gz", "has_sig": false, "md5_digest": "b434a3bf071f6f0b7bb3f351f3bb06ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4959, "upload_time": "2019-06-26T19:43:45", "url": "https://files.pythonhosted.org/packages/d3/1f/1171fa448ff835f2f90183714c6d5f58834b197dfbbce2b5610d5be017a7/sloot.object-1.4.0.tar.gz" } ] }