{ "info": { "author": "Stanislav Prokop", "author_email": "prost87@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "===========\nEasy Plugins\n===========\n\nModule EasyPlugins provides easy way to manage plugins.\n\nI was searching for some easy yet powerful plugin framework, but no\nnothing suitable found. They are complicated, require implementation\nof some weird interface or they are ugly in other way. This is way\nI have decided to reinvent the wheel and create this module (well,\nit's just one class and a few tests).\n\nWhat does it do? It scans your python path and try to load anything that\nlooks like a python stuff with prefix you specify. That's all.\n\nLet's show you some example. Let's say I have a python application called\nimage_resizer. Core functionality is in this package. Then I have some\nplugins that know something about image formats and each is using some very\nclever algorithm. These plugins are called with prefix 'image_resizer_',\nso in regexp speech they match '^image_resizer_.*'. For example\nimage_resizer_png, image_resizer_jpg and image_resizer_gif.\n\nIn the described situation, one might use:\n\n extensions = {}\n plugins = EasyPlugins('image_resizer_')\n\n # plugins are now lazy initialized, next time you\n # call iteration, it will immediately return\n # an iterator of plugin modules\n for name, plugin in plugins:\n extension = plugin.extension\n resizer_class = plugin.Resizer\n extensions[extension] = resizer_class\n\nSo in general usage is following:\n\n plugins = EasyPlugins('desired_prefix_')\n\n for name, plugin in plugins:\n # do whatever you need with the module\n # we have a duct typing, use it!\n expected_class = plugin.Class\n expected_function = plugin.function\n custom_terminal_options = plugin.options\n\nActually you can provide multiple plugin names, for example\nfor backward compatibility:\n\n plugins = EasyPlugins(['archiver_', 'archiver_plugin_'])\n\nIf you would like to add plugins from directory that is not on the path\nfor some reason, you could still use them by setting the additional path.\nThis situation usually happens during development of the plugins.\n\n PYTHONPATH=/path/to/plugins /path/to/your/application.py\n\nYou can find this project on the bitbucket:\n* https://bitbucket.org/prost87/easyplugins\n\nContinuous integration is provided by the drone.io:\n* https://drone.io/prost87/EasyPlugins", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/prost87/easyplugins", "keywords": null, "license": "LICENSE.txt", "maintainer": null, "maintainer_email": null, "name": "easy_plugins", "package_url": "https://pypi.org/project/easy_plugins/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/easy_plugins/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/prost87/easyplugins" }, "release_url": "https://pypi.org/project/easy_plugins/1.0/", "requires_dist": null, "requires_python": null, "summary": "Keep your plugins simple, stupid!", "version": "1.0" }, "last_serial": 791493, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "3ac1503212e0c73fcb7a0aebf3e88fd5", "sha256": "236e94089616e40ce63cd8e521537c1bb34b6999a17bda1dc0b46b947f3b6e3b" }, "downloads": -1, "filename": "easy_plugins-1.0.tar.gz", "has_sig": false, "md5_digest": "3ac1503212e0c73fcb7a0aebf3e88fd5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4093, "upload_time": "2012-11-04T10:20:25", "url": "https://files.pythonhosted.org/packages/66/71/b1acbdf2cd392ac5b505f914997d58a1abe32175dfa217975dea1f0b9ef6/easy_plugins-1.0.tar.gz" }, { "comment_text": "", "digests": { "md5": "0a40761ff766bfbc164e568ff824e13b", "sha256": "beb604665be82d88da11512d0ad27a95f19d2e6ba068db368376cfc254c17a23" }, "downloads": -1, "filename": "easy_plugins-1.0.zip", "has_sig": false, "md5_digest": "0a40761ff766bfbc164e568ff824e13b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8548, "upload_time": "2012-11-04T10:21:39", "url": "https://files.pythonhosted.org/packages/b3/7f/6044ce914f371540e49d9384c3f7667b1302065073a543db8e8794c3a229/easy_plugins-1.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3ac1503212e0c73fcb7a0aebf3e88fd5", "sha256": "236e94089616e40ce63cd8e521537c1bb34b6999a17bda1dc0b46b947f3b6e3b" }, "downloads": -1, "filename": "easy_plugins-1.0.tar.gz", "has_sig": false, "md5_digest": "3ac1503212e0c73fcb7a0aebf3e88fd5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4093, "upload_time": "2012-11-04T10:20:25", "url": "https://files.pythonhosted.org/packages/66/71/b1acbdf2cd392ac5b505f914997d58a1abe32175dfa217975dea1f0b9ef6/easy_plugins-1.0.tar.gz" }, { "comment_text": "", "digests": { "md5": "0a40761ff766bfbc164e568ff824e13b", "sha256": "beb604665be82d88da11512d0ad27a95f19d2e6ba068db368376cfc254c17a23" }, "downloads": -1, "filename": "easy_plugins-1.0.zip", "has_sig": false, "md5_digest": "0a40761ff766bfbc164e568ff824e13b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8548, "upload_time": "2012-11-04T10:21:39", "url": "https://files.pythonhosted.org/packages/b3/7f/6044ce914f371540e49d9384c3f7667b1302065073a543db8e8794c3a229/easy_plugins-1.0.zip" } ] }