Package pyxmpp :: Package jabber :: Module simple
[hide private]

Module simple

source code

Simple API for simple things like sendig messages or single stanzas.
Functions [hide private]
 
xmpp_do(jid, password, function, server=None, port=None)
Connect as client to a Jabber/XMPP server and call the provided function when stream is ready for IM.
source code
 
send_message(my_jid, my_password, to_jid, body, subject=None, message_type=None, server=None, port=None)
Star an XMPP session and send a message, then exit.
source code
Variables [hide private]
  __package__ = None
hash(x)
Function Details [hide private]

xmpp_do(jid, password, function, server=None, port=None)

source code 
Connect as client to a Jabber/XMPP server and call the provided function when stream is ready for IM. The function will be called with one argument -- the XMPP stream. After function returns the stream is closed.

send_message(my_jid, my_password, to_jid, body, subject=None, message_type=None, server=None, port=None)

source code 
Star an XMPP session and send a message, then exit.
Parameters:
  • my_jid (: pyxmpp.jid.JID) - : sender JID.
  • my_password (: unicode) - : sender password.
  • to_jid (: pyxmpp.jid.JID) - : recipient JID.
  • body (: unicode) - : message body.
  • subject (: unicode) - : message subject.
  • message_type (: str) - : message type.
  • server (: unicode or str) - : server to connect to (default: derivied from my_jid using DNS records).
  • port (: int) - : TCP port number to connect to (default: retrieved using SRV DNS record, or 5222).