module documentation
Plugin system for Twisted.
| Authors | |
| Jp Calderone | |
| Glyph Lefkowitz |
| Interface | |
Interface that must be implemented by all plugins. |
| Class | |
A collection of CachedPlugin instances from a particular module in a plugin package. |
| Class | |
Undocumented |
| Function | get |
Compute all the possible loadable plugins, while loading as few as possible and hitting the filesystem as little as possible. |
| Function | get |
Retrieve all plugins implementing the given interface beneath the given module. |
| Function | plugin |
Return a list of additional directories which should be searched for modules to be included as part of the named plugin package. |
| Function | _generate |
Undocumented |
| Function | _plugins |
Undocumented |
| Type Variable | _ |
Undocumented |
Compute all the possible loadable plugins, while loading as few as possible and hitting the filesystem as little as possible.
| Parameters | |
| module | a 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: types.ModuleType | None = None) -> Iterable[ _TInterface]:
(source)
¶
Retrieve all plugins implementing the given interface beneath the given module.
| Parameters | |
interface:type[ | An interface class. Only plugins which implement this interface will be returned. |
package:types.ModuleType | None | A package beneath which plugins are installed. For most uses, the default value is correct. |
| Returns | |
Iterable[ | An iterator of plugins. |
Return a list of additional directories which should be searched for modules to be included as part of the named plugin package.
| Parameters | |
| name:str | The fully-qualified Python name of a plugin package, eg 'twisted.plugins'. |
| Returns | |
| list of str | The absolute paths to other directories which may contain plugin modules for the named plugin package. |