Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`plugin``

module documentation
(source)

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
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, package=None): (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:`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.

def _generateCacheEntry(provider): (source)

Undocumented

def _pluginsPackage(): (source)

Undocumented

Returns
`types.ModuleType` | Undocumented

_TInterface = (source)

Undocumented

Value

    TypeVar('_TInterface',
            bound=Interface)