Registry / workflow / plugincode

plugincode

JSON →
library32.0.0pypypi✓ verified 84d ago

plugincode is a Python library providing plugin functionality for the ScanCode toolkit. It defines a plugin system with hooks, data-driven processing, and a registry for plugins. Current version 32.0.0, released June 2023. Release cadence is irregular, with major version bumps.

pip install plugincode
INSTALL
IMPORT
SIG · PLUGINCODE
P
plugincode
workflowpythonv32.0.0
Install
3.1s avg
Import
456ms
Disk
28MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v32.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.464s · 28.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.1s · import 0.448s · 30MB
28MB installed
● package 28MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PluginManager
from plugincode import PluginManager
from plugincode.manager import PluginManager
PluginManager is exposed at the top-level package, not in a submodule
plugin_manager
from plugincode import plugin_manager
The default instance of PluginManager is also at top-level
PluginsRegistry
from plugincode import PluginsRegistry
Registry class for plugins

Basic usage: iterate over registered plugins or filter by hook.

from plugincode import plugin_manager # Get all registered plugins for plugin in plugin_manager.get_plugins(): print(plugin) # Or get plugins by hook name for plugin in plugin_manager.get_plugins_by_hook('pre_scan'): print(plugin.name)
Debug
Known issues
breakingPython 3.6 support dropped in v31.0.0
fix
Upgrade to Python 3.7 or later.
affects: >=31.0.0
deprecatedCalver versioning dropped in v30.0.0; now uses semver.
fix
Use semantic versioning for dependency specs (e.g., plugincode>=30.0.0).
affects: <30.0.0
gotchaPluginManager is a singleton; direct instantiation may lead to multiple instances.
fix
Use the pre-initialized `plugin_manager` instance from `plugincode` module instead of creating a new PluginManager().
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'plugincode'
plugincode not installed.
fix
Run: pip install plugincode
AttributeError: module 'plugincode' has no attribute 'PluginManager'
Outdated version (<30.0.0) where PluginManager was not exposed at top level.
fix
Upgrade to latest version: pip install --upgrade plugincode
Upgrade
Version history
32.0.0latest on PyPI · released May 2, 2023
Audit
Dependencies
commoncoderequiredProvides Codebase and Resource classes used in plugin processing
packagingrequiredUsed for version comparisons
Agent activity
35 hits · last 30 days
node
30
OpenAI (training)
2
Resources
plugincode — pip install plugincode · libregistry