Home | Trees | Index | Help |
|
---|
|
PyXMPP is object-oriented, most of its fetures are implemented via classes, defined in various pyxmpp modules. The API is very asynchronous -- often requested objects are not returned immediately, but instead a callback is called when the object is available or an event occurs.
As python is not a strongly-typed language so the parameter and attribute types shown in this documentation are not enforced, but those types are expected by the package and others may simply not work or stop working in future releases of PyXMPP.
Base XMPP features (RFC 3920, RFC
3921) are implemented in direct
submodules of pyxmpp
package. Most JSF defined
extensions are defined in pyxmpp.jabber
package and modules for server
components are placed in pyxmpp.jabberd
.
For convenience most important names (classes for application use) may be
imported into pyxmpp
, pyxmpp.jabber
or pyxmpp.jabberd
packages. To do
that pyxmpp.all
, pyxmpp.jabber.all
or pyxmpp.jabberd.all
must be
imported. One doesn't have to remember any other module name then.
Most of PyXMPP object constructors are polymorphic. That means they accept
different types and number of arguments to create object from various input.
Usually the first argument may be an XML node to parse/wrap into the object
or parameters needed to create a new object from scratch. E.g.
pyxmpp.stanza.Stanza
constructor accepts single libxml2.xmlNode
argument
with XML stanza or set of keyword arguments (from_jid, to_jid, stanza_type,
etc.) to create such XML stanza. Most of the constructors will also accept
instance of their own class to create a copy of it.
Elements of XMPP protocol (like various stanza, roster or JSF extensions' objects) have various properties, like addresses, values, types etc. Those are values of apropriate elements or attributes in the XML protocol. In PyXMPP such elements are stored as parsed XML nodes (subtrees) or just the properties, however the API is supposed to consistent, whatever is the internal representation (which may change sometimes).
Common properties are accessible as object attributes and/or via get_* and
set_* functions. Attributes access gives direct access to the internal
storage or the cached value and will be usually faster, but for object using
XML node as internal representation only get_* functions result is always
up-to-date (attribute value may become invalid after the node is modified
directly using libxml2
API).
Most objects describing elements of the XMPP protocol or its extensions have method as_xml() providing their XML representations.
Submodules | |
---|---|
|
Variable Summary | |
---|---|
str |
__revision__ = '$Id: __init__.py 616 2005-12-26 15:28:56...
|
pyxmpp.all
,
pyxmpp.cache
,
pyxmpp.client
,
pyxmpp.clientstream
,
pyxmpp.error
,
pyxmpp.expdict
,
pyxmpp.iq
,
pyxmpp.jabber
,
pyxmpp.jabberd
,
pyxmpp.jid
,
pyxmpp.message
,
pyxmpp.objects
,
pyxmpp.presence
,
pyxmpp.resolver
,
pyxmpp.roster
,
pyxmpp.sasl
,
pyxmpp.stanza
,
pyxmpp.stanzaprocessor
,
pyxmpp.stream
,
pyxmpp.streambase
,
pyxmpp.streamsasl
,
pyxmpp.streamtls
,
pyxmpp.utils
,
pyxmpp.version
,
pyxmpp.xmlextra
,
pyxmpp.xmppstringprep
Client
,
ClientStream
,
Iq
,
JID
,
Message
,
Presence
,
Roster
,
RosterItem
,
Stream
,
TLSSettings
ClientError
,
ClientStreamError
,
FatalStreamError
,
JIDError
,
StanzaError
,
StreamEncryptionRequired
,
StreamError
,
StreamParseError
tls_available
Variable Details |
---|
__revision__
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Mon Dec 26 17:57:37 2005 | http://epydoc.sf.net |