{ "info": { "author": "Jo\u00e3o S. O. Bueno", "author_email": "gwidion@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "## extradeco\n\n### parametrized(flat_decorator)\n\nA super-flatter decorator decorator!\n\nOne is supposed to decorate what would be your inner \"wrapper\" function in a decorator with\n\"parametrized\". That \"wrapper\" can now be used as a paramterized decorator with extra parameters\nwhatever parameters it takes when decorating are passed along with the func object when the func itself\nis called - \"*args\" and \"**kwargs\" arguments should be passed down in the call to the original `func`.\n\n### Example of use:\n\nCreate a flat decorator which wants parameters by doing:\n\n```\nfrom extradeco import paremetrized\n\n@parametrized\ndef ubberlog(func, loglevel, *args, **kw):\n if loglevel > 2:\n print (\"doing things\")\n if loglevel > 1:\n print(\"doing less things\")\n # Line that calls the original function directly on the decorator body\n result = func(*args, **kw)\n if loglevel:\n print(\"function returned\", result)\n return result\n```\n\nAnd then, the new logger decorator is ready to be used like this:\n\n\n```\n\n@ubberlog(2)\ndef soma(a, b):\n return a + b\n\n\n@ubberlog(1)\ndef s1(a, b):\n return a + b\n```\n\n### Warning\nFor now, the parameter names in the decorator cannot match any parameter name in the final decorated function.\nIt is advised that you prefix the parameter names in the decorator with somethign that won't be present in the decorated functions.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jsbueno/extradeco", "keywords": "decorator utils simplifier", "license": "LGPLv3+", "maintainer": null, "maintainer_email": null, "name": "extradeco", "package_url": "https://pypi.org/project/extradeco/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/extradeco/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/jsbueno/extradeco" }, "release_url": "https://pypi.org/project/extradeco/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Decorator utils. Currently 'paremetrized': a decorator to enable flat decorators: call the wrapped func straight from your decorator body", "version": "0.1.1" }, "last_serial": 2148282, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "46abd0bf9d305ec9ebcf6b6f7f57cec1", "sha256": "52872bd0f0230a16e6fcfe3484e915993e45a194bdb297efce168c534ea13a39" }, "downloads": -1, "filename": "extradeco-0.1.0.tar.gz", "has_sig": false, "md5_digest": "46abd0bf9d305ec9ebcf6b6f7f57cec1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2743, "upload_time": "2016-06-03T02:59:29", "url": "https://files.pythonhosted.org/packages/5c/e1/9a15c02cfddf473c5268c06af7c56c72904c9fdac9a942e52d7353ae97e1/extradeco-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "b3c790d740e0dd7e6a2c648724a0da5d", "sha256": "f7458a7b7839add3753b0646fb28717346a114e24876e2d741c0333a9d341032" }, "downloads": -1, "filename": "extradeco-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b3c790d740e0dd7e6a2c648724a0da5d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5573, "upload_time": "2016-06-03T03:20:39", "url": "https://files.pythonhosted.org/packages/e1/d0/bea97a7f08a7c1bf4ea69426b839024ab0adf50351ed26bed71279095e5a/extradeco-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b3c790d740e0dd7e6a2c648724a0da5d", "sha256": "f7458a7b7839add3753b0646fb28717346a114e24876e2d741c0333a9d341032" }, "downloads": -1, "filename": "extradeco-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b3c790d740e0dd7e6a2c648724a0da5d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5573, "upload_time": "2016-06-03T03:20:39", "url": "https://files.pythonhosted.org/packages/e1/d0/bea97a7f08a7c1bf4ea69426b839024ab0adf50351ed26bed71279095e5a/extradeco-0.1.1.tar.gz" } ] }