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”:
Search in specific fields. The following search matches all objects
in "twisted.mail" that matches “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”:
Results provided by Lunr.js
Component architecture for Twisted, based on Zope3 components.
Using the Zope3 API directly is strongly recommended. Everything you need is in the top-level of the zope.interface package, e.g.:
from zope.interface import Interface, implementer class IFoo(Interface): pass @implementer(IFoo) class Foo: pass print(IFoo.implementedBy(Foo)) # True print(IFoo.providedBy(Foo())) # True
twisted.python.components.registerAdapter from this module may be used to add to Twisted's global adapter registry.
twisted.python.components.proxyForInterface is a factory for classes which allow access to only the parts of another class defined by a specified interface.
||I am the default implementation of an Adapter for some interface.|
||I am a mixin to allow you to be adapted in various ways persistently.|
||Return registered adapter for a given class and interface.|
||Returns the Twisted global zope.interface.adapter.AdapterRegistry instance.|
||Create a class which proxies all method calls which adhere to an interface to another provider of that interface.|
||Register an adapter class.|
||A proxied class method.|
||A descriptor which will proxy attribute access, mutation, and deletion to the
||Add an adapter hook which will attempt to look up adapters in the given registry.|
||Remove a previously added adapter hook.|
Return registered adapter for a given class and interface.
Note that is tied to the *Twisted* global registry, and will thus not find adapters registered elsewhere.
Returns the Twisted global zope.interface.adapter.AdapterRegistry instance.
Create a class which proxies all method calls which adhere to an interface to another provider of that interface.
This function is intended for creating specialized proxies. The typical way to use it is by subclassing the result:
class MySpecializedProxy(proxyForInterface(IFoo)): def someInterfaceMethod(self, arg): if arg == 3: return 3 return self.original.someInterfaceMethod(arg)
|iface||The Interface to which the resulting object will conform, and which the wrapped object must provide.|
|original||name of the attribute used to save the original object in the resulting class. Default to original.|
|A class whose constructor takes the original object as its only argument. Constructing the class creates the proxy.|
Register an adapter class.
An adapter class is expected to implement the given interface, by adapting instances implementing 'origInterface'. An adapter class's __init__ method should accept one parameter, an instance implementing 'origInterface'.
Add an adapter hook which will attempt to look up adapters in the given registry.
|The hook which was added, for later use with |