{ "info": { "author": "Pieter van Beek", "author_email": "aiopluggy.github.com@djinnit.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Plugins", "Framework :: AsyncIO", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "aiopluggy - A minimalist asyncio-ready plugin system\n====================================================\n.. image:: https://readthedocs.org/projects/aiopluggy/badge/?version=latest\n :target: http://aiopluggy.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\nPlease `read the docs`_ to learn more!\n\n\nA definitive example\n--------------------\n.. code-block:: python\n\n import aiopluggy, asyncio\n\n hookspec = aiopluggy.HookspecMarker(\"myproject\")\n hookimpl = aiopluggy.HookimplMarker(\"myproject\")\n\n\n class MySpec(object):\n \"\"\"A hook specification namespace.\n \"\"\"\n @hookspec\n def myhook(self, arg1, arg2):\n \"\"\"My special little hook that you can customize.\n \"\"\"\n\n\n class Plugin_1(object):\n \"\"\"A hook implementation namespace.\n \"\"\"\n @hookimpl.asyncio\n async def myhook(self, arg1, arg2):\n print(\"inside Plugin_1.myhook()\")\n return arg1 + arg2\n\n\n class Plugin_2(object):\n \"\"\"A 2nd hook implementation namespace.\n \"\"\"\n @hookimpl\n def myhook(self, arg1, arg2):\n print(\"inside Plugin_2.myhook()\")\n return arg1 - arg2\n\n\n async def main():\n # create a manager and add the spec\n pm = aiopluggy.PluginManager(\"myproject\")\n pm.register_specs(MySpec)\n\n # register plugins\n await pm.register(Plugin_1())\n await pm.register(Plugin_2())\n\n # call our `myhook` hook\n results = await pm.hook.myhook(arg1=1, arg2=2)\n print(results)\n\n\n asyncio.get_event_loop.run_until_complete(main())\n\n.. links\n.. _read the docs:\n https://aiopluggy.readthedocs.io/en/latest/\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Amsterdam/aiopluggy", "keywords": "plugin", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "aiopluggy", "package_url": "https://pypi.org/project/aiopluggy/", "platform": "", "project_url": "https://pypi.org/project/aiopluggy/", "project_urls": { "Homepage": "https://github.com/Amsterdam/aiopluggy" }, "release_url": "https://pypi.org/project/aiopluggy/0.1.5rc3/", "requires_dist": null, "requires_python": "", "summary": "Plugin and hook calling mechanisms for python", "version": "0.1.5rc3" }, "last_serial": 3581206, "releases": { "0.1.5rc3": [ { "comment_text": "", "digests": { "md5": "89c72925006c3efdc400b9871c751b6b", "sha256": "b35386853c0ad32004aff7015d219d9c3d92f9a77e96aafaca8afec87e0ab141" }, "downloads": -1, "filename": "aiopluggy-0.1.5rc3.tar.gz", "has_sig": false, "md5_digest": "89c72925006c3efdc400b9871c751b6b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12800, "upload_time": "2018-02-14T12:38:20", "url": "https://files.pythonhosted.org/packages/e1/bf/82d53651603f773043919d70c598db06a22b0e2d485cf43a3ec652868781/aiopluggy-0.1.5rc3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "89c72925006c3efdc400b9871c751b6b", "sha256": "b35386853c0ad32004aff7015d219d9c3d92f9a77e96aafaca8afec87e0ab141" }, "downloads": -1, "filename": "aiopluggy-0.1.5rc3.tar.gz", "has_sig": false, "md5_digest": "89c72925006c3efdc400b9871c751b6b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12800, "upload_time": "2018-02-14T12:38:20", "url": "https://files.pythonhosted.org/packages/e1/bf/82d53651603f773043919d70c598db06a22b0e2d485cf43a3ec652868781/aiopluggy-0.1.5rc3.tar.gz" } ] }