{ "info": { "author": "Johan L\u00fcbcke", "author_email": "johan.lubcke@trioptima.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6" ], "description": ".. image:: https://travis-ci.org/TriOptima/tri.struct.svg?branch=master\n :target: https://travis-ci.org/TriOptima/tri.struct\n.. image:: http://codecov.io/github/TriOptima/tri.struct/coverage.svg?branch=master\n :target: http://codecov.io/github/TriOptima/tri.struct?branch=master\n\ntri.struct\n==========\n\ntri.struct supplies classes that can be used like dictionaries and as objects with attribute access at the same time. There are two versions:\n\n- Struct: mutable struct\n- FrozenStruct: immutable struct\n\nSome niceties include:\n\n- Predictable repr() so it's easy to write tests\n- `merged` function call to merge different types of dicts into a new: `merged(Struct(a=1), FrozenStruct(b=1), c=1) == Struct(a=1, b=1, c=1)`)\n- Accelerated implementation in c for improved speed. (With python-only fallback reference implementation)\n\nExample\n-------\n\n.. code:: python\n\n >>> from tri_struct import Struct\n >>> foo = Struct()\n >>> foo.a = 1\n >>> foo['a']\n 1\n >>> foo['a'] = 2\n >>> foo.a\n 2\n\n\nRunning tests\n-------------\n\nYou need tox installed then just `make test`.\n\n\nLicense\n-------\n\nBSD\n\n\nDocumentation\n-------------\n\nhttp://tristruct.readthedocs.org.\n\n\nChangelog\n---------\n\n3.1.0 (2019-08-14)\n~~~~~~~~~~~~~~~~~~\n\n* Override __copy__ for Frozen. This is an optimization that was found in big uses of tri.token.\n\n3.0.1 (2019-06-12)\n~~~~~~~~~~~~~~~~~~\n\n* Problems with pypi, this is the same as 3.0.1\n\n\n3.0.0 (2019-06-04)\n~~~~~~~~~~~~~~~~~~\n\n* Renamed module from `tri.struct` to `tri_struct`. This is a breaking change.\n\n* Dropped python2 support\n\n\n2.5.7 (2018-11-16)\n~~~~~~~~~~~~~~~~~~\n\n* Fixed performance issue with `Frozen`/`FrozenStruct`: the hash was recalculated on each use instead of cached.\n\n\n2.5.6 (2018-06-26)\n~~~~~~~~~~~~~~~~~~\n\n* Fixed release functionality\n\n2.5.5 (2018-02-20)\n~~~~~~~~~~~~~~~~~~\n\n* Fixed segfault in repr when running under Python 3\n\n\n2.5.4 (2017-06-13)\n~~~~~~~~~~~~~~~~~~\n\n* Added `DefaultStruct` in the spirit of the standard library `defaultdict`.\n Also added a `to_default_struct` for recursively converting dicts recursively.\n\n\n2.5.3 (2017-02-10)\n~~~~~~~~~~~~~~~~~~\n\n* Fix use-after-free when repring a `Struct` that contains\n itself more than once.\n\n2.5.2 (2016-04-07)\n~~~~~~~~~~~~~~~~~~\n\n* Fix make and tox targets for build and release.\n* Fix lint issues.\n\n2.5.1 (2015-12-15)\n~~~~~~~~~~~~~~~~~~\n\n* Bugfix: Fix compilation of the _cstruct module.\n\n2.5.0 (unreleased)\n~~~~~~~~~~~~~~~~~~\n\n* Build changes.\n\n2.4.0 (2015-12-08)\n~~~~~~~~~~~~~~~~~~\n\n* Improvement: If a Struct subclass implements the `__missing__` method,\n it will not be called before GetAttr on attribute access, but will be\n called before GetAttr on dict access.\n\n2.3.1 (2015-12-07)\n~~~~~~~~~~~~~~~~~~\n\n* Bugfix: Clear KeyError in CStruct getattr before trying GetAttr,\n otherwise the KeyError may \"leak out\". Also, only clear the error\n and attempt GetAttr if the original error was a KeyError.\n\n2.3.0 (2015-12-02)\n~~~~~~~~~~~~~~~~~~\n\n* Add mixin class `Frozen` to make read-only versions of a dict-derived\n class (typically a Struct or a subclass there of.)\n\n* Use the `Frozen` mixin to implement `FrozenStruct`\n\n2.2.0 (2015-11-12)\n~~~~~~~~~~~~~~~~~~\n\n* Add keyword arguments to `merged` function.\n\n2.1.2 (2015-11-11)\n~~~~~~~~~~~~~~~~~~\n\n* Redo the C implementation to be a \"heaptype\", and remove the hack of\n setting `__dict__` = `self`. Instead, `object` will control the type\n storage, letting us \"insert\" attributes into the object without\n polluting the `dict`.\n\n2.0 (unreleased)\n~~~~~~~~~~~~~~~~\n\n* slim down interface to again match dict\n* add tri.struct.merged function to join structs\n* add optional C implementation to speed up instantiation\n\n1.0 (2015-09-29)\n~~~~~~~~~~~~~~~~\n\n* Struct with attribute & dict interface\n* __add__ and __or__ to combine structs", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/TriOptima/tri.struct", "keywords": "tri.struct", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "tri.struct", "package_url": "https://pypi.org/project/tri.struct/", "platform": "", "project_url": "https://pypi.org/project/tri.struct/", "project_urls": { "Homepage": "https://github.com/TriOptima/tri.struct" }, "release_url": "https://pypi.org/project/tri.struct/3.1.0/", "requires_dist": null, "requires_python": "", "summary": "tri.struct supplies classes that can be used like dictionaries and as objects with attribute access at the same time", "version": "3.1.0" }, "last_serial": 5676867, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "b3233d968570b39b8c07f7ae6ec14281", "sha256": "c3b7eb54b0890774996f081d4ce00bc428786aa40d4ca2c0f9edc6b1fde792bd" }, "downloads": -1, "filename": "tri.struct-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b3233d968570b39b8c07f7ae6ec14281", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4864, "upload_time": "2015-07-02T09:28:42", "url": "https://files.pythonhosted.org/packages/cb/c1/fe234f7ce0b35ce803412f63b846391eca35e46166a475f2c6631244055c/tri.struct-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9e453f217d3119b8b94e1a4457c6b079", "sha256": "1915c99d98cf1e048302050defc5c1eebc8e5bebb7c372d9e12c98e7eed4e125" }, "downloads": -1, "filename": "tri.struct-0.1.0.tar.gz", "has_sig": false, "md5_digest": "9e453f217d3119b8b94e1a4457c6b079", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5147, "upload_time": "2015-07-02T09:28:46", "url": "https://files.pythonhosted.org/packages/bd/13/701d5ebe15a26fbff1db18c017b376d7199b4a61ea999f62d0deaf0885f0/tri.struct-0.1.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "b3d4195bb0890d96d9ffcd30cc662a59", "sha256": "50a7c01ba146296b26fde517e84c24b39e341fe1228be44128ce6f88e334d8fb" }, "downloads": -1, "filename": "tri.struct-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b3d4195bb0890d96d9ffcd30cc662a59", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4993, "upload_time": "2015-09-23T08:30:47", "url": "https://files.pythonhosted.org/packages/ca/4c/03717745435589cf1384afa8a4badf1c9e1a60dc41bd00e50a1dc657e3e1/tri.struct-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d8a9e450c31b5908f7d8285715b38301", "sha256": "009e318205fd9281d65eb56a04d681dae98a32b6feeb0eb4d28be0cb007bfd52" }, "downloads": -1, "filename": "tri.struct-0.3.0.tar.gz", "has_sig": false, "md5_digest": "d8a9e450c31b5908f7d8285715b38301", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5237, "upload_time": "2015-09-23T08:30:54", "url": "https://files.pythonhosted.org/packages/d6/e8/e753fff1bc874bfe5010bc4e19eb45f387cc344802d79ccd9a9b6699d1ba/tri.struct-0.3.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "033abf5c634392d3dfaa0a863e0f211f", "sha256": "a0304763511e5af6a95d67ce8e6daee583073f46413472888f8b74a26f2e3906" }, "downloads": -1, "filename": "tri.struct-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "033abf5c634392d3dfaa0a863e0f211f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4176, "upload_time": "2015-09-29T20:04:17", "url": "https://files.pythonhosted.org/packages/2c/9e/9ea1a87061e0a08fee01a39612c0d01b2e4d19f016e0be69f41a0a26e14a/tri.struct-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f5129ae067cf20d4f4dca64329170bc8", "sha256": "745c55cc65239dd33a1f308dd504e4f74c3b1f1d6f69a08e28032ce9fafa15b6" }, "downloads": -1, "filename": "tri.struct-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f5129ae067cf20d4f4dca64329170bc8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4423, "upload_time": "2015-09-29T20:04:22", "url": "https://files.pythonhosted.org/packages/43/c9/9e95f830a447fbad781340202e64b83ca8a224beba4246b2e86e6fbd0611/tri.struct-1.0.0.tar.gz" } ], "2.2.0": [ { "comment_text": "", "digests": { "md5": "e18294a5ffe29ce0a0f6d54b193dde1f", "sha256": "c991d103900fc29b473e43dfa517a34d469a639fa8bf404d9229913339b429e8" }, "downloads": -1, "filename": "tri.struct-2.2.0-py2.7-macosx-10.10-x86_64.egg", "has_sig": false, "md5_digest": "e18294a5ffe29ce0a0f6d54b193dde1f", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 12995, "upload_time": "2015-11-12T14:00:16", "url": "https://files.pythonhosted.org/packages/a2/2c/2fdf6b0e3b0efb3a42c364b7e874c15c3344109b3107ee9dc3eaa30e438d/tri.struct-2.2.0-py2.7-macosx-10.10-x86_64.egg" } ], "2.3.0": [ { "comment_text": "", "digests": { "md5": "805b919f6ad54889530ab86fcce57247", "sha256": "c6e7f7843655059090f4acc8d5569cfa8a547b0b00df61a140567e4fc3465ec8" }, "downloads": -1, "filename": "tri.struct-2.3.0-py2.7-macosx-10.10-x86_64.egg", "has_sig": false, "md5_digest": "805b919f6ad54889530ab86fcce57247", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 13151, "upload_time": "2015-12-02T08:55:57", "url": "https://files.pythonhosted.org/packages/32/1e/8f3eed45e53167bf6f02dafb3f64c3734fd9d19fc63e8646ffdc480a77bf/tri.struct-2.3.0-py2.7-macosx-10.10-x86_64.egg" }, { "comment_text": "", "digests": { "md5": "c2629c0ac5daf83456d3913459893e81", "sha256": "814dc5fb5d0cb5a55246cc8d9a2c63952eef6a2c61d3020fc50e6a772caec5a4" }, "downloads": -1, "filename": "tri.struct-2.3.0.tar.gz", "has_sig": false, "md5_digest": "c2629c0ac5daf83456d3913459893e81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15078, "upload_time": "2015-12-02T08:56:12", "url": "https://files.pythonhosted.org/packages/ef/0e/e2749db6a6e2c82b4a7f366cfe20b167911a66b4e7d13f4b581f66296f79/tri.struct-2.3.0.tar.gz" } ], "2.5.0": [ { "comment_text": "", "digests": { "md5": "71ea71f08f958e593498986ef473d98d", "sha256": "13b6ed0c9a62ab83cf7f7d091c8cac22b766d4a2a86ee238df022c79a39019be" }, "downloads": -1, "filename": "tri.struct-2.5.0-py2.7-macosx-10.10-x86_64.egg", "has_sig": false, "md5_digest": "71ea71f08f958e593498986ef473d98d", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 6592, "upload_time": "2015-12-15T12:37:03", "url": "https://files.pythonhosted.org/packages/65/a8/1aed0c27c54b708c6d0f6bb6e88e4538698030ff78ef5fb0c40bdbace3f1/tri.struct-2.5.0-py2.7-macosx-10.10-x86_64.egg" }, { "comment_text": "", "digests": { "md5": "f9b366ae8782c69aa7424747049b17bc", "sha256": "b7b7a767d5dbcaa5353f55879db735afdfb8d877b48382a0c28e9eab345a7410" }, "downloads": -1, "filename": "tri.struct-2.5.0.tar.gz", "has_sig": false, "md5_digest": "f9b366ae8782c69aa7424747049b17bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15693, "upload_time": "2015-12-15T12:34:11", "url": "https://files.pythonhosted.org/packages/7d/26/8395721e97e7afaec755b7ed0b748c1a68336a68752ff0884a8a1783e197/tri.struct-2.5.0.tar.gz" } ], "2.5.1": [ { "comment_text": "", "digests": { "md5": "348dd3261175cade1d852d4fba74523a", "sha256": "c78463436d55abad8c006a874fbba8c16432ab1e2cd725bbfdc4ee67c4b51ef6" }, "downloads": -1, "filename": "tri.struct-2.5.1-py2.7-macosx-10.10-x86_64.egg", "has_sig": false, "md5_digest": "348dd3261175cade1d852d4fba74523a", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 14085, "upload_time": "2015-12-16T07:50:23", "url": "https://files.pythonhosted.org/packages/73/44/f51439e3942c07a5d3fccbcd97b9ceb7991ce3cea96b87cf102dd05b5e1b/tri.struct-2.5.1-py2.7-macosx-10.10-x86_64.egg" }, { "comment_text": "", "digests": { "md5": "d5ab36caedd57503d23223c1dcecd8b7", "sha256": "2f92ce21b28d7fdd5a39f7386a2b6e75135232e054779256fed0384168c50d4f" }, "downloads": -1, "filename": "tri.struct-2.5.1.tar.gz", "has_sig": false, "md5_digest": "d5ab36caedd57503d23223c1dcecd8b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16368, "upload_time": "2015-12-16T07:50:30", "url": "https://files.pythonhosted.org/packages/24/2b/082733a4d2f84dcbd4c2be0ef017e09df32e999ca0788a7254780e3bf8c0/tri.struct-2.5.1.tar.gz" } ], "2.5.2": [ { "comment_text": "", "digests": { "md5": "5adecb2f23d2bb3063465c156aa11fe7", "sha256": "a3cd44bc2e97cdc1d9cc6254b0a79802255581fe56567cc152a0cc05d311a4d3" }, "downloads": -1, "filename": "tri.struct-2.5.2.tar.gz", "has_sig": false, "md5_digest": "5adecb2f23d2bb3063465c156aa11fe7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15823, "upload_time": "2016-04-18T07:57:01", "url": "https://files.pythonhosted.org/packages/f4/af/da448f0c9f28f63e01cb12ee537b623892402a5cbe3faf8fe0d3f50df505/tri.struct-2.5.2.tar.gz" } ], "2.5.3": [ { "comment_text": "", "digests": { "md5": "abd263912a71b1fefcbfea426584cb46", "sha256": "1b9fc64683c91f5cd87933e1695fd6b9bcd468b0a0d59a33f2e3f0ad241675b9" }, "downloads": -1, "filename": "tri.struct-2.5.3.tar.gz", "has_sig": false, "md5_digest": "abd263912a71b1fefcbfea426584cb46", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15892, "upload_time": "2017-02-10T13:59:09", "url": "https://files.pythonhosted.org/packages/bf/01/4156644cf28d5be7c6deab52f22ab5f7c0c911fe09d3c50fd9fd67021f80/tri.struct-2.5.3.tar.gz" } ], "2.5.4": [ { "comment_text": "", "digests": { "md5": "6ad6bb99003e38a7396a1288f5bbb939", "sha256": "9e620c91e1f0a563f188c14110f912a1a0e40995f1cb4419faf6ed6ac65fc7f8" }, "downloads": -1, "filename": "tri.struct-2.5.4.tar.gz", "has_sig": false, "md5_digest": "6ad6bb99003e38a7396a1288f5bbb939", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16165, "upload_time": "2017-06-19T07:51:47", "url": "https://files.pythonhosted.org/packages/67/4c/9b63b8ac125d39b04d09ec13fef5e8a93879892cb14f31bf31bb175f9688/tri.struct-2.5.4.tar.gz" } ], "2.5.5": [ { "comment_text": "", "digests": { "md5": "58337c4d522c16d09634c86d73aa6dd6", "sha256": "fb87e48279748b0e35c936f5a3ded7483fa572075a99f8f628a037fbd860b2b8" }, "downloads": -1, "filename": "tri.struct-2.5.5.tar.gz", "has_sig": false, "md5_digest": "58337c4d522c16d09634c86d73aa6dd6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16247, "upload_time": "2018-05-23T09:12:39", "url": "https://files.pythonhosted.org/packages/65/b0/724a1c1e673986ced06cb87e70c28ccdd5e2d2693287af5992b672d58977/tri.struct-2.5.5.tar.gz" } ], "2.5.6": [ { "comment_text": "", "digests": { "md5": "8f5ebc3d5bd52735f88ad14e2d673ba3", "sha256": "186be06b4bc4d9e48acf483d1a39bdc8aed87784d7e85689a11d9f1836e0246c" }, "downloads": -1, "filename": "tri.struct-2.5.6.tar.gz", "has_sig": false, "md5_digest": "8f5ebc3d5bd52735f88ad14e2d673ba3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17916, "upload_time": "2018-10-09T09:16:09", "url": "https://files.pythonhosted.org/packages/e8/a6/07d7762ac9168f69adea03363af95b9963b07b459b71c68b33ff123eb6fb/tri.struct-2.5.6.tar.gz" } ], "2.5.7": [ { "comment_text": "", "digests": { "md5": "190e16fe9b5d671bd9773bb56e0200ee", "sha256": "1ab4804ca6e174e346df3110fbe580a1ce347b646c97542ec5f34861e528936a" }, "downloads": -1, "filename": "tri.struct-2.5.7.tar.gz", "has_sig": false, "md5_digest": "190e16fe9b5d671bd9773bb56e0200ee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18035, "upload_time": "2018-11-23T08:14:11", "url": "https://files.pythonhosted.org/packages/a6/d3/e2d04e73251850bf7f4d552e38356c20a8555034434a1a7717088f0c2255/tri.struct-2.5.7.tar.gz" } ], "3.0.1": [ { "comment_text": "", "digests": { "md5": "165811cd3fdee9f51b12e2b4033b0ffe", "sha256": "2fd62052b8f2631c5bbd734a5656248450f442bbe38a6b4b1e74cc00f41d4d8e" }, "downloads": -1, "filename": "tri.struct-3.0.1.tar.gz", "has_sig": false, "md5_digest": "165811cd3fdee9f51b12e2b4033b0ffe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17862, "upload_time": "2019-06-12T13:57:14", "url": "https://files.pythonhosted.org/packages/51/73/9c5036881ea8c46c0535324e81b386c92a5f9680b5401b24e4684b400026/tri.struct-3.0.1.tar.gz" } ], "3.1.0": [ { "comment_text": "", "digests": { "md5": "a78109cd77c08a845861601b7d3cfb48", "sha256": "7bba406801e6900b0a78a4f5c5fa3270bbe857c5891f87fcd007d9fa8c5b6af4" }, "downloads": -1, "filename": "tri.struct-3.1.0.tar.gz", "has_sig": false, "md5_digest": "a78109cd77c08a845861601b7d3cfb48", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18003, "upload_time": "2019-08-14T12:51:07", "url": "https://files.pythonhosted.org/packages/2c/57/c462678f8cb48bdc468078802ee1454010cfe822d97bc176334c67001990/tri.struct-3.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a78109cd77c08a845861601b7d3cfb48", "sha256": "7bba406801e6900b0a78a4f5c5fa3270bbe857c5891f87fcd007d9fa8c5b6af4" }, "downloads": -1, "filename": "tri.struct-3.1.0.tar.gz", "has_sig": false, "md5_digest": "a78109cd77c08a845861601b7d3cfb48", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18003, "upload_time": "2019-08-14T12:51:07", "url": "https://files.pythonhosted.org/packages/2c/57/c462678f8cb48bdc468078802ee1454010cfe822d97bc176334c67001990/tri.struct-3.1.0.tar.gz" } ] }