{ "info": { "author": "Mark Torok", "author_email": "", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Welcome to Esu Struct!\n\n\n[![Build Status](https://travis-ci.org/torokmark/esu.svg?branch=master)](https://travis-ci.org/torokmark/esu)\n[![Documentation Status](https://readthedocs.org/projects/esu/badge/?version=latest)](https://esu.readthedocs.io/en/latest/)\n[![PyPI](https://img.shields.io/pypi/v/esu.svg?color=blue)](https://pypi.org/project/esu/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/esu.svg)](https://github.com/torokmark/esu)\n[![PyPI - License](https://img.shields.io/github/license/torokmark/esu)](https://github.com/torokmark/esu/blob/master/LICENSE.md)\n\n\nEnjoy the flexibility of structs with *esu*!\n\nYou can create types on the fly with previously declared fields and methods by using *esu struct*. \nThe created type additionally contains methods for equation, hashing and string representation.\n\n### Install\n\n```sh\npip install esu\n```\n\n### Usage\n\n#### Struct\n\n```py\nfrom esu import Struct, OpenStruct\n\nCustomer = Struct(\n 'Customer', \n 'name', 'age', \n methods={\n 'greeting': lambda self: \"Hello {}\".format(self.__dict__['name'])\n })\n\ndave = Customer()\ndave.name = 'Dave'\ndave.age = 25\ndave.greeting() # => Hello Dave \n\nanna = Customer('Anna', 28)\nanna.greeting() # => Hello Anna\n```\n\n#### OpenStruct\n\n```py\nbob = OpenStruct()\nbob.name = Bob\nbob.age = 54\nprint(bob) # => [name=Bob, age=54]\n\nsu = OpenStruct({'name': 'Su', 'gender': 'female'})\nsu.employed = True\nprint(su) # => [name=Su, gender=female, employed=True]\n```\n\n### Documentation\n\nFor further information, read the documentation that can be found: [https://esu.readthedocs.io](https://esu.readthedocs.io)\n\n### Contribution\n\n1. Fork it!\n2. Make your changes!\n3. Send a PR!", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/torokmark/esu", "keywords": "", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "esu", "package_url": "https://pypi.org/project/esu/", "platform": "", "project_url": "https://pypi.org/project/esu/", "project_urls": { "Documentation": "https://esu.readthedocs.io", "Homepage": "http://github.com/torokmark/esu", "Source": "https://github.com/torokmark/esu" }, "release_url": "https://pypi.org/project/esu/3.0.2/", "requires_dist": null, "requires_python": ">=3.5", "summary": "Enjoy the flexibility of structs with esu!", "version": "3.0.2", "yanked": false, "yanked_reason": null }, "last_serial": 6034727, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "c465ef17bb5a88bed73c651721926082", "sha256": "64a4dbc273b37754c3858d96ba9b25b2fdd2dec99dcf7d82c862e06d91660ef1" }, "downloads": -1, "filename": "esu-1.0.0.tar.gz", "has_sig": false, "md5_digest": "c465ef17bb5a88bed73c651721926082", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, >=3.5", "size": 1197, "upload_time": "2019-10-20T18:33:23", "upload_time_iso_8601": "2019-10-20T18:33:23.011166Z", "url": "https://files.pythonhosted.org/packages/47/6c/e27083cc083dacedc921f186c94f27366b4ffa9b96e77d07778d0d69fcbf/esu-1.0.0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "c5954cc528df7c35edf9d0dafcaf3c10", "sha256": "07eb4228bbd105d9a7e996bfad19b532a2fc39812891ccdd50a7cd5d1b90f77d" }, "downloads": -1, "filename": "esu-1.0.5.tar.gz", "has_sig": false, "md5_digest": "c5954cc528df7c35edf9d0dafcaf3c10", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, >=3.5", "size": 2501, "upload_time": "2019-10-23T09:19:22", "upload_time_iso_8601": "2019-10-23T09:19:22.546780Z", "url": "https://files.pythonhosted.org/packages/47/e4/4eeec7abadb3bd5f9248efd23a7d88207aa414c3294069e3f6bcfb84a5f1/esu-1.0.5.tar.gz", "yanked": false, "yanked_reason": null } ], "2.1.0": [ { "comment_text": "", "digests": { "md5": "220730e84390c574b30a8bb62463d88b", "sha256": "57cf8107669b1aac733210e8cae84e1c3959db53d755ec06a20ee4f2dee2f374" }, "downloads": -1, "filename": "esu-2.1.0.tar.gz", "has_sig": false, "md5_digest": "220730e84390c574b30a8bb62463d88b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, >=3.5", "size": 2768, "upload_time": "2019-10-23T19:30:49", "upload_time_iso_8601": "2019-10-23T19:30:49.875495Z", "url": "https://files.pythonhosted.org/packages/17/f3/ed79fe35220cc992d13095c8700b560e020b1bfbfff4e6ec54de2e6b05a0/esu-2.1.0.tar.gz", "yanked": false, "yanked_reason": null } ], "2.1.2": [ { "comment_text": "", "digests": { "md5": "b5ae4e9f5d046578f9bcf169cc82e7dc", "sha256": "33bb8b88f80f837fb5770e57980e071e617007a35b5e01e86943bc81d5eeaa4e" }, "downloads": -1, "filename": "esu-2.1.2.tar.gz", "has_sig": false, "md5_digest": "b5ae4e9f5d046578f9bcf169cc82e7dc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, >=3.5", "size": 2767, "upload_time": "2019-10-23T19:34:17", "upload_time_iso_8601": "2019-10-23T19:34:17.673315Z", "url": "https://files.pythonhosted.org/packages/70/94/a362d29e72d5b62783c8b79a14145fd746e5f3c998a5310e305697b41411/esu-2.1.2.tar.gz", "yanked": false, "yanked_reason": null } ], "2.1.6": [ { "comment_text": "", "digests": { "md5": "7020fa916c4a20916b426788f783a927", "sha256": "224b6c127d0aab260da87d4c9e1d29fd63a4ef8a1bde3960f63624d3449bb7eb" }, "downloads": -1, "filename": "esu-2.1.6.tar.gz", "has_sig": false, "md5_digest": "7020fa916c4a20916b426788f783a927", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 2791, "upload_time": "2019-10-25T06:50:30", "upload_time_iso_8601": "2019-10-25T06:50:30.640229Z", "url": "https://files.pythonhosted.org/packages/2e/71/4f557937339b739fab2f0715ae5e3d2ee4de8b72a101555f0d70225d6dc1/esu-2.1.6.tar.gz", "yanked": false, "yanked_reason": null } ], "3.0.0": [ { "comment_text": "", "digests": { "md5": "0921dbfb632dc39091f0cbe74e427d0c", "sha256": "b22960d745cdb63aa189155fc87ea30838aab619b86b1f7ae26807f0c6375f70" }, "downloads": -1, "filename": "esu-3.0.0.tar.gz", "has_sig": false, "md5_digest": "0921dbfb632dc39091f0cbe74e427d0c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 3351, "upload_time": "2019-10-26T16:33:50", "upload_time_iso_8601": "2019-10-26T16:33:50.356957Z", "url": "https://files.pythonhosted.org/packages/37/37/0ae715221582ddd3ed6af5850f7369b714940e765c6ebb500275ba863c3b/esu-3.0.0.tar.gz", "yanked": false, "yanked_reason": null } ], "3.0.2": [ { "comment_text": "", "digests": { "md5": "a843f5966f0ae1319153da7330487999", "sha256": "e819ac6cd50e1d626d22d2f9b895a6c38d2b5b7b5e4710fe1810624dd6804dcb" }, "downloads": -1, "filename": "esu-3.0.2.tar.gz", "has_sig": false, "md5_digest": "a843f5966f0ae1319153da7330487999", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 3361, "upload_time": "2019-10-26T19:18:17", "upload_time_iso_8601": "2019-10-26T19:18:17.674921Z", "url": "https://files.pythonhosted.org/packages/91/73/a4f4c76f8ea7416d504d3303500e9f16802b90c83fd4afc26c146bf51206/esu-3.0.2.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a843f5966f0ae1319153da7330487999", "sha256": "e819ac6cd50e1d626d22d2f9b895a6c38d2b5b7b5e4710fe1810624dd6804dcb" }, "downloads": -1, "filename": "esu-3.0.2.tar.gz", "has_sig": false, "md5_digest": "a843f5966f0ae1319153da7330487999", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 3361, "upload_time": "2019-10-26T19:18:17", "upload_time_iso_8601": "2019-10-26T19:18:17.674921Z", "url": "https://files.pythonhosted.org/packages/91/73/a4f4c76f8ea7416d504d3303500e9f16802b90c83fd4afc26c146bf51206/esu-3.0.2.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }