{ "info": { "author": "D. Scott Boggs", "author_email": "scott@tams.tech", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Topic :: Software Development :: Code Generators", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Delegate\n### A python library for delegation (the metaprogramming feature)\n\nThis library adds the `@delegate` decorator which may be used to delegate\nattributes from an attribute of the existing class. For example:\n\n```python\nfrom delegate import delegate\n\nclass Parent:\n def __init__(self):\n self.a = \"a\"\n self.b = \"b\"\n self.d = \"d\"\n\n# The delegate decorator makes .a and .b available on Child, through its\n# \"parent\" attribute, as though Child had an a and b attribute itself.\n@delegate(\"a\", \"b\", to=\"parent\")\nclass Child:\n def __init__(self):\n self.parent = Parent()\n self.c = \"c\"\n\ninstance = Child()\nassert instance.a == \"a\"\nraised = False\ntry:\n # But d is not available\n instance.d\nexcept e:\n raised = True\n\nassert raised\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dscottboggs/python-delegate", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "delegate-property", "package_url": "https://pypi.org/project/delegate-property/", "platform": "", "project_url": "https://pypi.org/project/delegate-property/", "project_urls": { "Homepage": "https://github.com/dscottboggs/python-delegate" }, "release_url": "https://pypi.org/project/delegate-property/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "delegate attributes of a class to another attribute's properties", "version": "0.1.0" }, "last_serial": 5585125, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "a1dfa218de0acb9309a6dc3d6c97aa5b", "sha256": "bf9628e14984abbb425f53f203bad6c586aa9daa2a1227b09ddc277cc51cb28d" }, "downloads": -1, "filename": "delegate_property-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a1dfa218de0acb9309a6dc3d6c97aa5b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3396, "upload_time": "2019-07-25T19:04:48", "url": "https://files.pythonhosted.org/packages/3a/c7/dc178d42c3bf2b30d4cb4e7fc2a82097e6b136636f28856a16c173296c42/delegate_property-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b4800f7b293480de7887ed89d8622dc1", "sha256": "52f2ab303b187e16c391356b114c69f410ff84560e0444ea8206f3196c08ffab" }, "downloads": -1, "filename": "delegate_property-0.1.0.tar.gz", "has_sig": false, "md5_digest": "b4800f7b293480de7887ed89d8622dc1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2249, "upload_time": "2019-07-25T19:04:51", "url": "https://files.pythonhosted.org/packages/0f/27/e752d3c4fbcb1ccf4fd590014a0d7558b779501e3c993143a4cccc990457/delegate_property-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a1dfa218de0acb9309a6dc3d6c97aa5b", "sha256": "bf9628e14984abbb425f53f203bad6c586aa9daa2a1227b09ddc277cc51cb28d" }, "downloads": -1, "filename": "delegate_property-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a1dfa218de0acb9309a6dc3d6c97aa5b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3396, "upload_time": "2019-07-25T19:04:48", "url": "https://files.pythonhosted.org/packages/3a/c7/dc178d42c3bf2b30d4cb4e7fc2a82097e6b136636f28856a16c173296c42/delegate_property-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b4800f7b293480de7887ed89d8622dc1", "sha256": "52f2ab303b187e16c391356b114c69f410ff84560e0444ea8206f3196c08ffab" }, "downloads": -1, "filename": "delegate_property-0.1.0.tar.gz", "has_sig": false, "md5_digest": "b4800f7b293480de7887ed89d8622dc1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2249, "upload_time": "2019-07-25T19:04:51", "url": "https://files.pythonhosted.org/packages/0f/27/e752d3c4fbcb1ccf4fd590014a0d7558b779501e3c993143a4cccc990457/delegate_property-0.1.0.tar.gz" } ] }