Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

XMPP/Jabber implementation for Python

Project Description

Note: This code is far from being complete and is not actively developed. Though, it has proven to be useful for some, anyway.


The goal of this project is to rewrite PyXMPP so:

  • it doesn’t rely on libxml2 any more
  • it uses most current Python APIs
  • its API is cleaned up
  • etc.


  • Python 2.7 or 3.2
  • DNSPython Limited functionality is available without it.

Python 3 support

The source code is written for Python 2.7, but automated facilities are available for conversion to 3.2. For this to work you need the Distribute package installed for Python 3.

To build or install the py3k package run the script using the Python 3 interpreter:

python3 build
python3 install

You may want to give --build-base py3-build option to build if you are also building Python 2 version.

If you have the GNU Make utility (every Linux distribution provides it) you may use make command instead:

make py3-build
make py3-install

Those will also make the Python3 version of the examples in the py3-examples directory if you are using a GIT checkout (source distributions already provide those).

As for now (2011-07-02) there is no official DNSPython release for Python 3, you may want to check their experimental branch.


  • RFC 6120 – XMPP Core:
    • SRV record look-up (requires DNSPython)
    • XML streams:
      • both initiator and receiver side
      • ‘xml:lang’ attribute handling on the root element
      • ‘version’ attribute handling, including special ‘0.9’ (no version) case
      • full XML namespace support
      • does not generate and does not accept XML that is not well-formed
      • stream errors
    • StartTLS:
      • initiator (client) side implemented
      • cerificate verification:
        • ‘Subject Alt Name’ / ‘DNS’ field
        • ‘Subject’ / ‘Common Name’ field
    • SASL:
      • both initiator and receiver side
      • supported mechanisms:
        • PLAIN
        • DIGEST-MD5
        • SCRAM-SHA-1
        • SCRAM-SHA-1-PLUS (python 3.3, not released yet, needed)
    • Resource binding
    • XMPP Stanzas:
      • <iq/>, <presence/> and <message/> stanzas
      • stanza errors
  • RFC 6121 – XMPP Instant Messaging and Presence:
    • Roster Management:
      • versioned rosters
      • subscription pre-approval flag
  • RFC 6122 – XMPP Address Format:
    • Full unicode support
    • ‘Nameprep’ strinprep profile for the local part (for validation and comparision)
    • ‘Resourceprep’ for the resource part
    • ‘IDNA’ encoding for the domain part
  • XMPP Extensions:
  • I/O framework:
    • asynchronous main event loop
    • alternative implementation with threads
    • non-blocking connect
    • non-blocking TLS handshake
  • stanza processing framework:
    • chained handlers for <message/> and <presence/> stanzas, matched by stanza type and, optionally, payload class (derivied from namespace-qualified element name)
    • handlers for <iq type='get'/> and <iq type='set'/> stanzas, matched by payload element name (namespace-qualified)
    • handlers for <iq type='result'/> and <iq type='error'/> registered for outbound <iq type='get'/> and <iq type='set'/> stanzas and matched by the stanza id

A bit more formal list of the XMPP features implemented is available in the wiki:


Release History

Release History

This version
History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyxmpp2-2.0.0-py2.7.egg (576.5 kB) Copy SHA256 Checksum SHA256 2.7 Egg Sep 22, 2013
pyxmpp2-2.0.0-py3.3.egg (589.5 kB) Copy SHA256 Checksum SHA256 3.3 Egg Sep 22, 2013
pyxmpp2-2.0.0.tar.gz (652.3 kB) Copy SHA256 Checksum SHA256 Source Sep 22, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting