module documentation

Plugin system for Twisted.

Authors
Jp Calderone
Glyph Lefkowitz
Interface IPlugin Interface that must be implemented by all plugins.
Class CachedDropin A collection of CachedPlugin instances from a particular module in a plugin package.
Class CachedPlugin Undocumented
Function getCache Compute all the possible loadable plugins, while loading as few as possible and hitting the filesystem as little as possible.
Function getPlugins Retrieve all plugins implementing the given interface beneath the given module.
Function pluginPackagePaths Return a list of additional directories which should be searched for modules to be included as part of the named plugin package.
Function _generateCacheEntry Undocumented
Function _pluginsPackage Undocumented
Type Variable _TInterface Undocumented
def getCache(module): (source)

Compute all the possible loadable plugins, while loading as few as possible and hitting the filesystem as little as possible.

Parameters
modulea Python module object. This represents a package to search for plugins.
Returns
a dictionary mapping module names to CachedDropin instances.
def getPlugins(interface: Type[_TInterface], package: Optional[types.ModuleType] = None) -> Iterable[_TInterface]: (source)

Retrieve all plugins implementing the given interface beneath the given module.

Parameters
interface:Type[_TInterface]An interface class. Only plugins which implement this interface will be returned.
package:Optional[types.ModuleType]A package beneath which plugins are installed. For most uses, the default value is correct.
Returns
Iterable[_TInterface]An iterator of plugins.
def pluginPackagePaths(name): (source)

Return a list of additional directories which should be searched for modules to be included as part of the named plugin package.

Parameters
name:strThe fully-qualified Python name of a plugin package, eg 'twisted.plugins'.
Returns
list of strThe absolute paths to other directories which may contain plugin modules for the named plugin package.
def _generateCacheEntry(provider): (source)

Undocumented

def _pluginsPackage() -> types.ModuleType: (source)

Undocumented

_TInterface = (source)

Undocumented

Value
TypeVar('_TInterface',
        bound=Interface)