Jabber IDs (JID)#

class slixmpp.jid.JID(jid=None, bare=False)[source]#

A representation of a Jabber ID, or JID.

Each JID may have three components: a user, a domain, and an optional resource. For example: user@domain/resource

When a resource is not used, the JID is called a bare JID. The JID is a full JID otherwise.

JID Properties:
full:

The string value of the full JID.

jid:

Alias for full.

bare:

The string value of the bare JID.

node:

The node portion of the JID.

user:

Alias for node.

local:

Alias for node.

username:

Alias for node.

domain:

The domain name portion of the JID.

server:

Alias for domain.

host:

Alias for domain.

resource:

The resource portion of the JID.

Parameters:
  • jid (string) – A string of the form '[user@]domain[/resource]'.

  • bare (bool) – If present, discard the provided resource.

Raises:

InvalidJID

unescape()[source]#

Return an unescaped JID object.

Using an unescaped JID is preferred for displaying JIDs to humans, and they should NOT be used for any other purposes than for presentation.

Returns:

UnescapedJID

New in version 1.1.10.