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`.`words`.`protocols`.`jabber`.`jid``

module documentation
(source)

Jabber Identifier support.

This module provides an object to represent Jabber Identifiers (JIDs) and parse string representations into them with proper checking for illegal characters, case folding and canonicalisation through `stringprep`.

Class | `JID` | Represents a stringprep'd Jabber ID.
Exception | `InvalidFormat` | The given string could not be parsed into a valid Jabber Identifier (JID).
Function | `internJID` | Return interned JID.
Function | `parse` | Parse given JID string into its respective parts and apply stringprep.
Function | `prep` | Perform stringprep on all JID fragments.
Variable | `__internJIDs` | Undocumented

def internJID(jidstring): (source)

Return interned JID.

Returns
`JID` | Undocumented

def parse(jidstring: `str`) -> `Tuple[Union[str, None], str, Union[str, None]]`: (source)

Parse given JID string into its respective parts and apply stringprep.

Parameters
jidstring:`str` | string representation of a JID.
Returns
`tuple` | tuple of (user, host, resource), each of type `str` as the parsed and stringprep'd parts of the given JID. If the given string did not have a user or resource part, the respective field in the tuple will hold `None`.

def prep(user: `Union[str, None]`, host: `str`, resource: `Union[str, None]`) -> `Tuple[Union[str, None], str, Union[str, None]]`: (source)

Perform stringprep on all JID fragments.

Parameters
user:`str` | The user part of the JID.
host:`str` | The host part of the JID.
resource:`str` | The resource part of the JID.
Returns
`tuple` | The given parts with stringprep applied.

__internJIDs: `Dict[str, JID]` = (source)

Undocumented