{ "info": { "author": "Seperman", "author_email": "sep@zepworks.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development" ], "description": "**DotObject v 1.2.1**\n\nDot Notation Object\n\nDot lets you define objects in dot notation format.\n\nYou need to subclass Dot and define your own load and optionally save methods in order to use the dot notation object.\n\n**Background**\n\nDot Notation object was originally designed to be the base library for a Redis client for Python. Thus the names 'load' and 'save' come from. The idea was to have python object that simply by writing obj.item=\"value\", it sets the redis key \"obj.item\" with \"value\" value.\nAnd as soon as it detects you are retrieving the value, it gets the latest version from Redis. But in the mean time, it gives you a lazy object till it actually needs the value from Redis.\n\nSo the Dot notation object is basically a lazy object that once its \"load\" and \"save\" methods are defined, it will run those methods when the object is saved or retrieved.\n\n**Parameters**\n\nroot_name : String, Optional.\n It is used to overwrite the Dot object root name.\n\nint_starts_with: String, Optional. Default: i\n It is used to idefntify integer parts since Python does not let integers as attributes.\n\n**Returns**\n\nA lazy object that will be evaluated when it is actually used.\n\n**Examples**\n\nDefining your own Dot\n >>> from dot import Dot\n >>> class This(Dot):\n ... def __init__(self, *args, **kwargs):\n ... super(This, self).__init__(*args, **kwargs)\n ... self.items = {}\n ... def load(self, paths):\n ... return {i: self.items[i] if i in self.items else \"value %s\" % i for i in paths}\n ... def save(self, path, value):\n ... self.items[path] = value\n ... \n\nCreating a Dot object\n >>> this = This()\n >>> aa = this.part1.part2.part3.part4\n >>> aa\n \n >>> print(aa)\n value this.part1.part2.part3.part4\n >>> aa\n value this.part1.part2.part3.part4\n\nDot objects get evaluated in a batch\n >>> this = This()\n >>> aa = this.part1\n >>> aa\n \n >>> bb = this.part2\n >>> bb\n \n >>> print(aa)\n value this.part1\n >>> aa\n value this.part1\n >>> bb\n value this.part2\n\nDealing with paths that have integers as a part\n >>> bb = this.part1.part2.i120\n >>> bb\n \n >>> print bb\n value this.part1.part2.120\n\nDealing with Dots like dictionary keys\n >>> cc = this['part1.part2.part4']\n >>> cc\n \n >>> dd = this['part1.%s.part4' % 100]\n >>> dd\n \n >>> path = 'part1.part2'\n >>> this[path] = 'This was set by a dynamic key.'\n >>> this.path\n This was set by a dynamic key.\n\n\nSaving Dots\n >>> this.part1.part2.part3.part4 = \"new value\"\n >>> zz = this.part1.part2.part3.part4\n >>> zz\n new value\n\nChanging Root name\n >>> class That(This):\n ... pass\n >>> that = That()\n >>> aa = that.something\n >>> print(aa)\n value that.something\n >>> bb = this.something\n >>> bb\n \n\nFlushing cache\n >>> aa = this.part1\n >>> print aa\n value this.part1\n >>> bb = this.part1 # reads from the cache\n >>> this.flush()\n >>> bb = this.part1 # Will evaluate this.part1 again", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/seperman/dotobject/tarball/master", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/seperman/dotobject", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "dotobject", "package_url": "https://pypi.org/project/dotobject/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/dotobject/", "project_urls": { "Download": "https://github.com/seperman/dotobject/tarball/master", "Homepage": "https://github.com/seperman/dotobject" }, "release_url": "https://pypi.org/project/dotobject/1.2.1/", "requires_dist": null, "requires_python": "", "summary": "Dot notation object", "version": "1.2.1" }, "last_serial": 2545634, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "b67ee64bc9cfeb6887baf06ff8c920f8", "sha256": "181ac0ef2c55118396fa71c649f044d1752feb493bad969e55177154d4785a0b" }, "downloads": -1, "filename": "dotobject-1.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "b67ee64bc9cfeb6887baf06ff8c920f8", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 9177, "upload_time": "2016-03-15T05:41:24", "url": "https://files.pythonhosted.org/packages/2a/8d/2e76a9bfaa7022035f1089f82549f32d901594e83c47f12bffcbcd6d20f8/dotobject-1.0.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "505aa1db9cb19a613eabec5c408895ad", "sha256": "f40621b6bbbd986d1305264589238c59accd37949a2d8c90b9a290144dec8220" }, "downloads": -1, "filename": "dotobject-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "505aa1db9cb19a613eabec5c408895ad", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9177, "upload_time": "2016-03-15T05:41:31", "url": "https://files.pythonhosted.org/packages/d2/83/0953d0033cd3ae67a506730db50c7a712b19cbb3669656579781e1807dec/dotobject-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3b788aaa73c0814604e6c3e0217bed48", "sha256": "98239172bb0ced0b29f0211fcaa5bcffa51b043494917f4bc67823ddb4b02d46" }, "downloads": -1, "filename": "dotobject-1.0.0.tar.gz", "has_sig": false, "md5_digest": "3b788aaa73c0814604e6c3e0217bed48", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6236, "upload_time": "2016-03-15T05:41:40", "url": "https://files.pythonhosted.org/packages/f2/c4/fadd41e0f9ac722b209c9bc10b8c213752cf48deb73478167ddf9347d1f6/dotobject-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "82bcac8dd25841935ce1ba9ba4af4044", "sha256": "45e46d196688b697514e5d3c83d85117ac28d3f2d9a56db8ac34fc7cbf90d775" }, "downloads": -1, "filename": "dotobject-1.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "82bcac8dd25841935ce1ba9ba4af4044", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 9483, "upload_time": "2016-08-23T00:54:13", "url": "https://files.pythonhosted.org/packages/a4/5b/5a4d3ea1ee24a4620c1e5fe5cb046c122208f7519244756bb3d9f9266f05/dotobject-1.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d43e536a453729ecdd79a99ed5b751a3", "sha256": "5e027e0b08516f970d625da31658fb8005332d51a4c785dfc2c58af29078f557" }, "downloads": -1, "filename": "dotobject-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d43e536a453729ecdd79a99ed5b751a3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9482, "upload_time": "2016-08-23T00:54:16", "url": "https://files.pythonhosted.org/packages/0d/c8/d2ed720e90dd6f0848048535e3c84e2361327f52586da9fd23c9fe7240aa/dotobject-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5602bde3f01aca8b13a3f5b0f17eb580", "sha256": "1c78f27d8b232f3c647a7b1e64753917c3c597ed3fa442fcfb8f051ba1f8a8f5" }, "downloads": -1, "filename": "dotobject-1.1.0.tar.gz", "has_sig": false, "md5_digest": "5602bde3f01aca8b13a3f5b0f17eb580", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6503, "upload_time": "2016-08-23T00:54:18", "url": "https://files.pythonhosted.org/packages/1d/51/3feee83c78156916be28e40013258c81d6798476b72bbc675b906b38b979/dotobject-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "5e75f00de65884bc33469c0c0e96da81", "sha256": "47a732b24b0bd213f55fd1f1c9eb6c10c0070516dead3007518b4de00bf16c66" }, "downloads": -1, "filename": "dotobject-1.2.0-py2-none-any.whl", "has_sig": false, "md5_digest": "5e75f00de65884bc33469c0c0e96da81", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 9625, "upload_time": "2016-08-30T00:07:15", "url": "https://files.pythonhosted.org/packages/53/63/f36ac84a843769426dda1759984afd3a775cfb9f70cff8c0ed1db10d66d4/dotobject-1.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "356eea768775d335646c4ecf9a1943e2", "sha256": "86cc840834e3566b59c178a2691e287143a07604d7a03d4e18ad7c31ebe25070" }, "downloads": -1, "filename": "dotobject-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "356eea768775d335646c4ecf9a1943e2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9625, "upload_time": "2016-08-30T00:07:17", "url": "https://files.pythonhosted.org/packages/71/a8/565b9a3957802d046b8c8d932eca0c7a45561673e3141222d8cb1697a4c3/dotobject-1.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a6ee1995217b35a7b5f3ab1639907d73", "sha256": "00e4577e0386be1c6db6e83b5f5001d98557136e1d8c1201067347e7e8c9de1b" }, "downloads": -1, "filename": "dotobject-1.2.0.tar.gz", "has_sig": false, "md5_digest": "a6ee1995217b35a7b5f3ab1639907d73", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6644, "upload_time": "2016-08-30T00:07:19", "url": "https://files.pythonhosted.org/packages/c9/d4/a918e8fa872342166785581a947eacf906357147992882ec7e53f35efe77/dotobject-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "24549aaa34ae4d5d5178dbd9e2c93380", "sha256": "ce4fdd812435fcd023b52ccec195f62b657a2ab5f517d06a666a67073ad5e403" }, "downloads": -1, "filename": "dotobject-1.2.1-py2-none-any.whl", "has_sig": false, "md5_digest": "24549aaa34ae4d5d5178dbd9e2c93380", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 9719, "upload_time": "2016-12-30T07:50:12", "url": "https://files.pythonhosted.org/packages/bd/a3/392d73d5e2b17bf4f2a4c4cbfd213f14a701657c9dd69b370dc38886863f/dotobject-1.2.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cde8e103897944b5b3464de3f9dff242", "sha256": "445f32cb1dd73042e769498e59575a6fd0f46801362a85475574ca881bfec8d5" }, "downloads": -1, "filename": "dotobject-1.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "cde8e103897944b5b3464de3f9dff242", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9718, "upload_time": "2016-12-30T07:50:15", "url": "https://files.pythonhosted.org/packages/88/7f/8e89c819e3b4d49feef5687540de994b7d596bee4abf500d79056d383a91/dotobject-1.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "39b4a3a85abdf5a5fb5adc0b9c24cea4", "sha256": "1f740d9da9b265fda0cab89b797550de6ab5452a6580db2d49bb4d49d98c3730" }, "downloads": -1, "filename": "dotobject-1.2.1.tar.gz", "has_sig": false, "md5_digest": "39b4a3a85abdf5a5fb5adc0b9c24cea4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6723, "upload_time": "2016-12-30T07:50:17", "url": "https://files.pythonhosted.org/packages/50/62/988510f18d118ba7a6998ff6b042055be00a0ab98c82961a2efc39da030a/dotobject-1.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "24549aaa34ae4d5d5178dbd9e2c93380", "sha256": "ce4fdd812435fcd023b52ccec195f62b657a2ab5f517d06a666a67073ad5e403" }, "downloads": -1, "filename": "dotobject-1.2.1-py2-none-any.whl", "has_sig": false, "md5_digest": "24549aaa34ae4d5d5178dbd9e2c93380", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 9719, "upload_time": "2016-12-30T07:50:12", "url": "https://files.pythonhosted.org/packages/bd/a3/392d73d5e2b17bf4f2a4c4cbfd213f14a701657c9dd69b370dc38886863f/dotobject-1.2.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cde8e103897944b5b3464de3f9dff242", "sha256": "445f32cb1dd73042e769498e59575a6fd0f46801362a85475574ca881bfec8d5" }, "downloads": -1, "filename": "dotobject-1.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "cde8e103897944b5b3464de3f9dff242", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9718, "upload_time": "2016-12-30T07:50:15", "url": "https://files.pythonhosted.org/packages/88/7f/8e89c819e3b4d49feef5687540de994b7d596bee4abf500d79056d383a91/dotobject-1.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "39b4a3a85abdf5a5fb5adc0b9c24cea4", "sha256": "1f740d9da9b265fda0cab89b797550de6ab5452a6580db2d49bb4d49d98c3730" }, "downloads": -1, "filename": "dotobject-1.2.1.tar.gz", "has_sig": false, "md5_digest": "39b4a3a85abdf5a5fb5adc0b9c24cea4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6723, "upload_time": "2016-12-30T07:50:17", "url": "https://files.pythonhosted.org/packages/50/62/988510f18d118ba7a6998ff6b042055be00a0ab98c82961a2efc39da030a/dotobject-1.2.1.tar.gz" } ] }