{"id":28474,"library":"yapsy","title":"Yapsy - Yet Another Plugin System","description":"Yapsy is a simple, reusable plugin system for Python applications. It provides a base class for plugins and a plugin manager that discovers and loads plugins from directories. The latest version is 1.12.2, with sporadic releases.","status":"active","version":"1.12.2","language":"python","source_language":"en","source_url":"https://github.com/tibonihoo/yapsy","tags":["plugins","plugin-system","dependency-injection"],"install":[{"cmd":"pip install yapsy","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"IPlugin is in the yapsy.IPlugin submodule, not top-level.","wrong":"from yapsy import IPlugin","symbol":"IPlugin","correct":"from yapsy.IPlugin import IPlugin"},{"note":"Common mistake: PluginManagerSingleton is inside PluginManager module.","wrong":"from yapsy import PluginManagerSingleton","symbol":"PluginManagerSingleton","correct":"from yapsy.PluginManager import PluginManagerSingleton"}],"quickstart":{"code":"from yapsy.IPlugin import IPlugin\nfrom yapsy.PluginManager import PluginManagerSingleton\n\nclass MyPlugin(IPlugin):\n    def activate(self):\n        print(\"Plugin activated\")\n    def deactivate(self):\n        print(\"Plugin deactivated\")\n\nif __name__ == \"__main__\":\n    pm = PluginManagerSingleton.get()\n    pm.setPluginPlaces([\"plugins\"])\n    pm.collectPlugins()\n    pm.activatePluginByName(\"MyPlugin\")\n    pm.deactivatePluginByName(\"MyPlugin\")","lang":"python","description":"Defines a plugin class, uses the singleton plugin manager to discover and activate plugins from a 'plugins' directory."},"warnings":[{"fix":"Override activate() instead of __init__ to access plugin manager or metadata.","message":"Plugin constructor (__init__) is called before plugin info (name, version, etc.) is set. Do not rely on plugin metadata in __init__; use activate() instead.","severity":"gotcha","affected_versions":"all"},{"fix":"Use PluginManagerSingleton.get() or pass plugin_places explicitly.","message":"The use of PluginManager without arguments is deprecated in favor of PluginManagerSingleton or custom locations.","severity":"deprecated","affected_versions":"<1.12"}],"env_vars":null,"search_vec":"'1.12.2':38 'anoth':3 'applic':15 'base':19 'class':20 'depend':47 'dependency-inject':46 'directori':33 'discov':28 'inject':48 'latest':35 'load':30 'manag':26 'plugin':4,11,22,25,31,42,44 'plugin-system':43 'provid':17 'python':14 'releas':41 'reusabl':10 'simpl':9 'sporad':40 'system':5,12,45 'version':36 'yapsi':1,6 'yet':2","created_at":"2026-05-09T05:55:42.235260+00:00","updated_at":"2026-05-09T05:55:42.235260+00:00","problems":[{"fix":"Ensure your plugin class inherits from yapsy.IPlugin.IPlugin and implements activate()/deactivate().","cause":"Trying to instantiate IPlugin base class directly or forgetting to inherit.","error":"yapsy.IPlugin.IPlugin is not instantiated correctly"},{"fix":"Call pm.collectPlugins() before trying to get a plugin by name.","cause":"PluginManagerSingleton.get() returned None because plugins were not collected yet.","error":"AttributeError: 'NoneType' object has no attribute 'getPluginByName'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":"http://yapsy.sourceforge.net","github":null,"docs":null,"changelog":null,"pypi":"https://pypi.org/project/yapsy/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["workflow","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}