{ "info": { "author": "Avram Lubkin", "author_email": "avylove@rockhopper.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Plugins", "Intended Audience :: Developers", "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": ".. start-badges\n\n| |docs| |travis| |codecov|\n| |pypi| |supported-versions| |supported-implementations|\n| |fedora| |EPEL|\n\n.. |docs| image:: https://img.shields.io/readthedocs/pluginlib.svg?style=plastic\n :target: https://pluginlib.readthedocs.org\n :alt: Documentation Status\n.. |travis| image:: https://img.shields.io/travis/Rockhopper-Technologies/pluginlib.svg?style=plastic\n :target: https://travis-ci.org/Rockhopper-Technologies/pluginlib\n :alt: Travis-CI Build Status\n.. |codecov| image:: https://img.shields.io/codecov/c/github/Rockhopper-Technologies/pluginlib.svg?style=plastic\n :target: https://codecov.io/gh/Rockhopper-Technologies/pluginlib\n :alt: Coverage Status\n\n.. |pypi| image:: https://img.shields.io/pypi/v/pluginlib.svg?style=plastic\n :alt: PyPI Package latest release\n :target: https://pypi.python.org/pypi/pluginlib\n.. |supported-versions| image:: https://img.shields.io/pypi/pyversions/pluginlib.svg?style=plastic\n :alt: Supported versions\n :target: https://pypi.python.org/pypi/pluginlib\n.. |supported-implementations| image:: https://img.shields.io/pypi/implementation/pluginlib.svg?style=plastic\n :alt: Supported implementations\n :target: https://pypi.python.org/pypi/pluginlib\n\n.. |fedora| image:: https://img.shields.io/badge/dynamic/json.svg?uri=https://pdc.fedoraproject.org/rest_api/v1/component-branches/?global_component=python-pluginlib;fields=name;active=true;type=rpm&query=$.results[?(@.name.startsWith(%22f%22))].name&label=Fedora&colorB=lightgray&style=plastic\n :alt: Fedora version support\n :target: https://bodhi.fedoraproject.org/updates/?packages=python-pluginlib\n\n.. |EPEL| image:: https://img.shields.io/badge/dynamic/json.svg?uri=https://pdc.fedoraproject.org/rest_api/v1/component-branches/?global_component=python-pluginlib;fields=name;active=true;type=rpm&query=$.results[?(@.name.startsWith(%22e%22))].name&label=EPEL&colorB=lightgray&style=plastic\n :alt: EPEL version support\n :target: https://bodhi.fedoraproject.org/updates/?packages=python-pluginlib\n\n\n\n.. end-badges\n\nOverview\n========\n\nPluginlib makes creating plugins for your project simple.\n\nFeatures\n--------\n\n- Plugins are validated when they are imported\n\n- Plugins can be loaded through different mechanisms (modules, filesystem paths, `entry points`_)\n\n- Multiple versions_ of the same plugin are supported (The newest one is used by default)\n\n- Plugins can be `blacklisted`_ by type, name, or version\n\n- Multiple `plugin groups`_ are supported so one program can use multiple sets of plugins that won't conflict\n\n- Plugins support `conditional loading`_ (examples: os, version, installed software, etc)\n\n- Once loaded, plugins can be accessed_ through dictionary or dot notation\n\nInstallation\n============\n\nPIP\n---\n\n.. code-block:: console\n\n $ pip install pluginlib\n\nEL6 and EL7 (RHEL/CentOS/Scientific)\n------------------------------------\n\n(EPEL_ repositories must be configured_)\n\n.. code-block:: console\n\n $ yum install python-pluginlib\n $ yum install python34-pluginlib\n\nFedora\n------\n\n.. code-block:: console\n\n $ dnf install python2-pluginlib\n $ dnf install python3-pluginlib\n\nUsage\n=====\n\nStep 1: Define plugin parent classes\n------------------------------------\n\nAll plugins are subclasses of parent classes. To create a parent class, use the\n`@Parent`_ decorator.\n\nThe `@Parent`_ decorator can take a plugin type for accessing child plugins\nof the parent. If a plugin type isn't given, the class name will be used.\n\nThe `@Parent`_ decorator can also take a ``group`` keyword which\nrestricts plugins to a specific plugin group. ``group`` should be specified if plugins for\ndifferent projects could be accessed in an single program, such as with libraries and frameworks.\nFor more information, see the `Plugin Groups`_ section.\n\nMethods required in child plugins should be labeled as abstract methods.\nPlugins without these methods or with parameters\nthat don't match, will not be loaded.\nFor more information, see the `Abstract Methods`_ section.\n\n.. code-block:: python\n\n \"\"\"\n sample.py\n \"\"\"\n import pluginlib\n\n @pluginlib.Parent('parser')\n class Parser(object):\n\n @pluginlib.abstractmethod\n def parse(self, string):\n pass\n\nStep 2: Define plugin classes\n-----------------------------\n\nTo create a plugin, subclass a parent class and include any required methods.\n\nPlugins can be customized through optional class attributes:\n\n `_alias_`_\n Changes the name of the plugin which defaults to the class name.\n\n `_version_`_\n Sets the version of the plugin. Defaults to the module ``__version__`` or ``None``\n If multiple plugins with the same type and name are loaded, the plugin with\n the highest version is used. For more information, see the Versions_ section.\n\n `_skipload_`_\n Specifies the plugin should not be loaded. This is useful when a plugin is a parent class\n for additional plugins or when a plugin should only be loaded under certain conditions.\n For more information see the `Conditional Loading`_ section.\n\n\n.. code-block:: python\n\n \"\"\"\n sample_plugins.py\n \"\"\"\n import json\n import sample\n\n class JSON(sample.Parser):\n\n _alias_ = 'json'\n\n def parse(self, string):\n return json.loads(string)\n\nStep 3: Load plugins\n--------------------\n\nPlugins are loaded when the module they are in is imported. PluginLoader_\nwill load modules from specified locations and provides access to them.\n\nPluginLoader_ can load plugins from several locations.\n - A program's standard library\n - `Entry points`_\n - A list of modules\n - A list of filesystem paths\n\nPlugins can also be filtered through blacklists and type filters.\nSee the Blacklists_ and `Type Filters`_ sections for more information.\n\nPlugins are accessible through the PluginLoader.plugins_ property,\na nested dictionary accessible through dot notation. For other ways to access plugins,\nsee the `Accessing Plugins`_ section.\n\n.. code-block:: python\n\n import pluginlib\n import sample\n\n loader = pluginlib.PluginLoader(modules=['sample_plugins'])\n plugins = loader.plugins\n parser = plugins.parser.json()\n print(parser.parse('{\"json\": \"test\"}'))\n\n.. _Entry points: https://packaging.python.org/specifications/entry-points/\n\n.. _PluginLoader: http://pluginlib.readthedocs.io/en/latest/api.html#pluginlib.PluginLoader\n.. _PluginLoader.plugins: http://pluginlib.readthedocs.io/en/latest/api.html#pluginlib.PluginLoader.plugins\n.. _@Parent: http://pluginlib.readthedocs.io/en/latest/api.html#pluginlib.Parent\n.. _\\_alias\\_: http://pluginlib.readthedocs.io/en/latest/api.html#pluginlib.Plugin._alias_\n.. _\\_version\\_: http://pluginlib.readthedocs.io/en/latest/api.html#pluginlib.Plugin._version_\n.. _\\_skipload\\_: http://pluginlib.readthedocs.io/en/latest/api.html#pluginlib.Plugin._skipload_\n\n.. _Versions: http://pluginlib.readthedocs.io/en/latest/concepts.html#versions\n.. _Blacklists: http://pluginlib.readthedocs.io/en/latest/concepts.html#blacklists\n.. _blacklisted: http://pluginlib.readthedocs.io/en/latest/concepts.html#blacklists\n.. _Type Filters: http://pluginlib.readthedocs.io/en/latest/concepts.html#type-filters\n.. _Accessing Plugins: http://pluginlib.readthedocs.io/en/latest/concepts.html#accessing-plugins\n.. _accessed: http://pluginlib.readthedocs.io/en/latest/concepts.html#accessing-plugins\n.. _Abstract Methods: http://pluginlib.readthedocs.io/en/latest/concepts.html#abstract-methods\n.. _Conditional Loading: http://pluginlib.readthedocs.io/en/latest/concepts.html#conditional-loading\n.. _Plugin Groups: http://pluginlib.readthedocs.io/en/latest/concepts.html#plugin-groups\n\n.. _EPEL: https://fedoraproject.org/wiki/EPEL\n.. _configured: https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Rockhopper-Technologies/pluginlib", "keywords": "plugin,plugins,pluginlib", "license": "MPLv2.0", "maintainer": "", "maintainer_email": "", "name": "pluginlib", "package_url": "https://pypi.org/project/pluginlib/", "platform": "", "project_url": "https://pypi.org/project/pluginlib/", "project_urls": { "Homepage": "https://github.com/Rockhopper-Technologies/pluginlib" }, "release_url": "https://pypi.org/project/pluginlib/0.6.2/", "requires_dist": [ "setuptools" ], "requires_python": "", "summary": "A framework for creating and importing plugins", "version": "0.6.2" }, "last_serial": 5657798, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "5d7df067f36524224a124f134236cd5e", "sha256": "e6a0efff8b045f18e0dee9c27fd65327984c769b2d7db526fcde677b318c9ae7" }, "downloads": -1, "filename": "pluginlib-0.0.1.tar.gz", "has_sig": false, "md5_digest": "5d7df067f36524224a124f134236cd5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 824, "upload_time": "2018-06-28T13:15:56", "url": "https://files.pythonhosted.org/packages/95/5b/2a58c06c4988eb7aa28b9325a5ea1dc0b7563e7911231fa8fd8985b73ab9/pluginlib-0.0.1.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "561b4e1516b71f85d5351278de29f7a4", "sha256": "c230c7c0185ecf19164bb059ffa6326115d0fdea3b4b83a68c8a1978f5f7bc05" }, "downloads": -1, "filename": "pluginlib-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "561b4e1516b71f85d5351278de29f7a4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 24921, "upload_time": "2018-07-23T16:37:58", "url": "https://files.pythonhosted.org/packages/59/3c/59f6917c3b0c8572f9839adf9051e5fa3d395da63870eaf018285258aafa/pluginlib-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b4d8037434f430e16497211aa04d393b", "sha256": "887da3a119939b83dfe477163b31091a104106f46780e29f6cf721c5523d2e15" }, "downloads": -1, "filename": "pluginlib-0.5.0.tar.gz", "has_sig": false, "md5_digest": "b4d8037434f430e16497211aa04d393b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 124333, "upload_time": "2018-07-23T16:37:59", "url": "https://files.pythonhosted.org/packages/5c/d5/eaab0cf1b93967d3665d071de5aad7eed511cbf127136db6ed2321863721/pluginlib-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "df8bc1c214223ff9c90cceb86033f2ba", "sha256": "7e9d7553fe9c1f6a9353947b2e8fb1b7a9861ce1c743765ecb788ce5c74a0c61" }, "downloads": -1, "filename": "pluginlib-0.5.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "df8bc1c214223ff9c90cceb86033f2ba", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 24845, "upload_time": "2018-07-23T16:50:08", "url": "https://files.pythonhosted.org/packages/d7/cb/a64217de22ba99d7b8425e0b58074776455eaa923d4559171c1c24334ad2/pluginlib-0.5.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "92f7b79e3bb3dea2a5efac60ea47f160", "sha256": "a12be1cdf5b555eedda7efae34995327f49599a0f0395caaf63a110aedb6ed6d" }, "downloads": -1, "filename": "pluginlib-0.5.1.tar.gz", "has_sig": false, "md5_digest": "92f7b79e3bb3dea2a5efac60ea47f160", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 124241, "upload_time": "2018-07-23T16:50:10", "url": "https://files.pythonhosted.org/packages/5b/42/329ef5ca9b5604614a59720bbaf753b22f59ec4dc18b36d93435645963df/pluginlib-0.5.1.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "db9c40485f8a093a0b91b1db68f99281", "sha256": "3c535da217df5e1b74d7c833e8646c8457e2af1d10a7af032632051c7186c8f1" }, "downloads": -1, "filename": "pluginlib-0.6.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "db9c40485f8a093a0b91b1db68f99281", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 26766, "upload_time": "2018-08-01T01:20:01", "url": "https://files.pythonhosted.org/packages/42/82/67c32d8c2edab84e23f09b89eedc4e953de159d832011e821aea28740bbd/pluginlib-0.6.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ea3ac244ed27091c5d5fb57a1d561bfa", "sha256": "82ed3396939c8182052639c60f03d024c45c2d0b20d7b4e68b24074b033fe135" }, "downloads": -1, "filename": "pluginlib-0.6.0.tar.gz", "has_sig": false, "md5_digest": "ea3ac244ed27091c5d5fb57a1d561bfa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 140933, "upload_time": "2018-08-01T01:20:02", "url": "https://files.pythonhosted.org/packages/bd/04/369ff1559608f128a51b2846155c328be63eeee5b85ed3d19e651a29215e/pluginlib-0.6.0.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "a9bca236a262c5083f7f7c363381fd64", "sha256": "112021742454f50a99d28ed478e339f57a3be4d9134d79c458cf67a3b0481f64" }, "downloads": -1, "filename": "pluginlib-0.6.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a9bca236a262c5083f7f7c363381fd64", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 26823, "upload_time": "2018-08-07T13:34:34", "url": "https://files.pythonhosted.org/packages/a2/9c/48d0129e6250c0304ecc631a16c173872a55976401a03028c3a778e95d18/pluginlib-0.6.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b20f595a5cd781939c96cd54bc1d281f", "sha256": "f449c59a362cf0a93a8a9dec0202c46e76e3ceec8f14dd23da65f3bd5a8a4e6a" }, "downloads": -1, "filename": "pluginlib-0.6.1.tar.gz", "has_sig": false, "md5_digest": "b20f595a5cd781939c96cd54bc1d281f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 143032, "upload_time": "2018-08-07T13:34:35", "url": "https://files.pythonhosted.org/packages/47/7a/7879982743f44c4a69ab3f687bd40fc13d2381b8f82f99075ce94fa7ef3d/pluginlib-0.6.1.tar.gz" } ], "0.6.2": [ { "comment_text": "", "digests": { "md5": "cb542005a752531340554f71ff148020", "sha256": "919a36f2730a921f163ef87ed26da38479ec415bdfd82fb003966fbdd721a15e" }, "downloads": -1, "filename": "pluginlib-0.6.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cb542005a752531340554f71ff148020", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 24302, "upload_time": "2019-08-09T21:09:43", "url": "https://files.pythonhosted.org/packages/e6/49/f26d2dd025d0b263d0fb5174b4da4539eae8afeabc20968af2e4b3046dd5/pluginlib-0.6.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "525770e013fc16c12a3a839acbb57702", "sha256": "3831db90f75450d465c964575b2ea02a58a15d10f724580c37d63cc7cfab74d1" }, "downloads": -1, "filename": "pluginlib-0.6.2.tar.gz", "has_sig": false, "md5_digest": "525770e013fc16c12a3a839acbb57702", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 135910, "upload_time": "2019-08-09T21:09:45", "url": "https://files.pythonhosted.org/packages/3b/40/77a6f5c8d781b012da8c600df86d93fc736b9612790dad37cf755a381d70/pluginlib-0.6.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cb542005a752531340554f71ff148020", "sha256": "919a36f2730a921f163ef87ed26da38479ec415bdfd82fb003966fbdd721a15e" }, "downloads": -1, "filename": "pluginlib-0.6.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cb542005a752531340554f71ff148020", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 24302, "upload_time": "2019-08-09T21:09:43", "url": "https://files.pythonhosted.org/packages/e6/49/f26d2dd025d0b263d0fb5174b4da4539eae8afeabc20968af2e4b3046dd5/pluginlib-0.6.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "525770e013fc16c12a3a839acbb57702", "sha256": "3831db90f75450d465c964575b2ea02a58a15d10f724580c37d63cc7cfab74d1" }, "downloads": -1, "filename": "pluginlib-0.6.2.tar.gz", "has_sig": false, "md5_digest": "525770e013fc16c12a3a839acbb57702", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 135910, "upload_time": "2019-08-09T21:09:45", "url": "https://files.pythonhosted.org/packages/3b/40/77a6f5c8d781b012da8c600df86d93fc736b9612790dad37cf755a381d70/pluginlib-0.6.2.tar.gz" } ] }