pkgcore.plugin module

Plugin system, heavily inspired by twisted’s plugin system.

pkgcore.plugin.get_plugin(key, package=None)[source]

Get a single plugin matching this key.

This assumes all plugins for this key have a priority attribute. If any of them do not the AttributeError is not stopped.

Returns:

highest-priority plugin or None if no plugin available.

pkgcore.plugin.get_plugins(key, package=None)[source]

Return all enabled plugins matching “key”.

Plugins with a C{disabled} attribute evaluating to C{True} are skipped.

pkgcore.plugin.initialize_cache(package, force=False, cache_dir=None)[source]

Determine available plugins in a package.

Writes cache files if they are stale and writing is possible.