Best python XMPP / Jabber client library?

PythonChatXmppGoogle Talk

Python Problem Overview


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

Python Solutions


Solution 1 - Python

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.

  • [slixmpp][4] is a friendly fork of sleekxmpp. It has removed all threads and is for python 3.7+.
  • sleekxmpp was pretty popular and was used for examples in Peter Saint-Andre's XMPP book from O'Reilly. It has been depricated in favor of slixmpp.

GPL libraries.

  • [xmpppy][5] was used by gajim from 2005-2014, and began as a forked jabberpy. Also lives at [xmpppy][6].
  • [nbxmpp][7] forked xmpppy, and is used by gajim. It requires python 3.7+ and is actively maintained.

LPGL libraries.

  • [aioxmpp][8] is an asyncio-based python 3.4+ library.
  • [pyxmpp][9] is abandoned in favor of pyxmpp2. It uses libxml2 internally for xml parsing.
  • [pyxmpp2][10] is the next version of pyxmpp, runs on python 2.7 and 3.3, and removes the libxml2 requirement. Like many, it requires [dnspython][11].
  • [jabberpy][12] is the original and is thoroughly unmaintained.

Other libraries.

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

[4]: https://dev.louiz.org/projects/slixmpp "slixmpp" [5]: http://xmpppy.sourceforge.net/ [6]: https://github.com/normanr/xmpppy [7]: https://python-nbxmpp.gajim.org/ [8]: https://github.com/horazont/aioxmpp "aioxmpp" [9]: https://github.com/Jajcus/pyxmpp [10]: https://github.com/Jajcus/pyxmpp2 [11]: http://www.dnspython.org/ [12]: http://jabberpy.sourceforge.net/ [13]: http://wokkel.ik.nu/

Solution 2 - Python

All of my best XMPP work has been using wokkel.

Couple examples:

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionflybywireView Question on Stackoverflow
Solution 1 - PythonA. R. DiederichView Answer on Stackoverflow
Solution 2 - PythonDustinView Answer on Stackoverflow