{ "info": { "author": "@orsinium", "author_email": "master_fess@mail.ru", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development", "Topic :: Software Development :: Interpreters", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Pre-processors", "Topic :: Software Development :: Testing", "Topic :: Software Development :: Testing :: Mocking", "Topic :: System :: Logging" ], "description": "# Advice\n\n[Aspect-oriented programming](https://en.wikipedia.org/wiki/Aspect-oriented_programming)\n\n## TODO\n\n1. FIX starred import\n1. Patch already imported objects (`patch_project`)\n\n## Usage\n\n```python\nimport aop\n\n\ndef multiply(context):\n print(context.args)\n print(context.kwargs)\n yield\n context.result *= 100\n\n\naop.register(\n handler=multiply,\n modules=aop.match(equals='math'),\n targets=aop.match(regexp='(sin|cos)')\n)\n```\n\nOk, let's check:\n\n```python\nIn [2]: import math\n\nIn [3]: math.cos(0)\n(0,)\n{}\nOut[3]: 100.0\n```", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/orsinium/advice", "keywords": "aop aspect oriented programming advice joinpoint patching import decorators logging testing extension", "license": "", "maintainer": "", "maintainer_email": "", "name": "aop", "package_url": "https://pypi.org/project/aop/", "platform": "", "project_url": "https://pypi.org/project/aop/", "project_urls": { "Homepage": "https://github.com/orsinium/advice" }, "release_url": "https://pypi.org/project/aop/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "Aspect-oriented programming", "version": "0.2.0" }, "last_serial": 4188056, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "c8ff428684a7818253f7e841c8831305", "sha256": "2bb26687689e115307fc06264867528181798d5d00982412e1aeb1f387159ac4" }, "downloads": -1, "filename": "aop-0.2.0.tar.gz", "has_sig": false, "md5_digest": "c8ff428684a7818253f7e841c8831305", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4382, "upload_time": "2018-08-20T11:36:38", "url": "https://files.pythonhosted.org/packages/d4/52/535986e3568ac6f14737e272b65d7eae99beb586bf1b88457ef805df34fc/aop-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c8ff428684a7818253f7e841c8831305", "sha256": "2bb26687689e115307fc06264867528181798d5d00982412e1aeb1f387159ac4" }, "downloads": -1, "filename": "aop-0.2.0.tar.gz", "has_sig": false, "md5_digest": "c8ff428684a7818253f7e841c8831305", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4382, "upload_time": "2018-08-20T11:36:38", "url": "https://files.pythonhosted.org/packages/d4/52/535986e3568ac6f14737e272b65d7eae99beb586bf1b88457ef805df34fc/aop-0.2.0.tar.gz" } ] }