Question

What are your experiences with Python Jabber / XMPP client libraries? What do you recommend?

Was it helpful?

Solution

It depends what license you can use. Some popular libraries are GPL which can cause serious issues if you need to use it for work, especially if you need to keep proprietary extensions. The LGPL libraries are a little less popular, I think, but you have more flexibility with what you can use them for.

I'd once looked at using twisted directly for some simple XMPP scripting but the documentation was literally non-existant. Like, I opened a published twisted reference manual and it didn't include xmpp or jabbber at all. Maybe they've fixed that now.

MIT libraries.

  • sleekxmpp (was: sleekxmpp) is pretty popular and is used for examples in Peter Saint-Andre's XMPP book from O'Reilly. It reportedly works well, and finally got an email list in April 2010, and has a chat room at sleek@conference.jabber.org.
  • slixmpp is a friendly fork of sleekxmpp. It has removed all threads, and is for python 3.4+.

GPL libraries.

  • xmpppy was used by gajim from 2005-2014, and began as a forked jabberpy. Also lives at xmpppy.
  • nbxmpp forked xmpppy, and is used by gajim. Has at least some python 3 support. It is actively maintained.

LPGL libraries.

  • aioxmpp is an asyncio-based python 3.4+ library.
  • pyxmpp is pretty good and uses libxml2 internally for xml parsing.
  • pyxmpp2 is the next version of pyxmpp, runs on python 2.7 and 3.2, and removes the libxml2 requirement. Like many, it requires dnspython.
  • jabberpy is the original and still works for a lot of tasks, but is thoroughly unmaintained.

Other libraries.

  • Wokkel, mentioned in another post. That's a new one for me, based on twisted.

OTHER TIPS

All of my best XMPP work has been using wokkel.

Couple examples:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top