{"id":22380,"library":"slixmpp","title":"Slixmpp","description":"Slixmpp is an elegant Python library for XMPP (aka Jabber), designed for event-driven, asynchronous communication. Current version is 1.14.1, supporting Python >=3.11. Release cadence is irregular, with a focus on stability and async compatibility.","status":"active","version":"1.14.1","language":"python","source_language":"en","source_url":"https://github.com/poezio/slixmpp","tags":["xmpp","jabber","async","chat","messaging","bot"],"install":[{"cmd":"pip install slixmpp","lang":"bash","label":"Latest stable"}],"dependencies":[],"imports":[{"note":"Slixmpp is a fork of SleekXMPP; do not use SleekXMPP imports.","wrong":"import sleekxmpp","symbol":"ClientXMPP","correct":"from slixmpp import ClientXMPP"},{"note":"","wrong":"","symbol":"ComponentXMPP","correct":"from slixmpp import ComponentXMPP"},{"note":"Iq (not IQ) is the correct class name; case matters.","wrong":"from slixmpp.stanza import IQ","symbol":"IQ","correct":"from slixmpp import Iq"},{"note":"","wrong":"","symbol":"JID","correct":"from slixmpp import JID"}],"quickstart":{"code":"import asyncio\nfrom slixmpp import ClientXMPP\n\nclass EchoBot(ClientXMPP):\n    def __init__(self, jid, password):\n        super().__init__(jid, password)\n        self.add_event_handler(\"session_start\", self.start)\n        self.add_event_handler(\"message\", self.message)\n\n    async def start(self, event):\n        self.send_presence()\n        self.get_roster()\n\n    async def message(self, msg):\n        if msg['type'] in ('chat', 'normal'):\n            msg.reply(\"Thanks for sending: \" + msg['body']).send()\n\nasync def main():\n    xmpp = EchoBot('user@example.com', 'password')\n    xmpp.connect()\n    await xmpp.process()\n\nasyncio.run(main())","lang":"python","description":"Connect to an XMPP server, handle session start, and echo messages back."},"warnings":[{"fix":"Upgrade to Python 3.11 or later, or pin to slixmpp<1.14.0 if stuck on older Python.","message":"Slixmpp dropped support for Python <3.11 in version 1.14.0.","severity":"breaking","affected_versions":">=1.14.0"},{"fix":"Use add_event_handler with event names as strings.","message":"The 'message' event handler 'on_message' pattern is deprecated; use 'add_event_handler(\"message\", callback)' instead.","severity":"deprecated","affected_versions":"all"},{"fix":"Use await asyncio.sleep() instead of time.sleep().","message":"Slixmpp uses asyncio; do not use time.sleep() inside event handlers as it blocks the event loop.","severity":"gotcha","affected_versions":"all"},{"fix":"Set socket.ssl_version to ssl.PROTOCOL_TLS_CLIENT or disable SSL verification with caution.","message":"When connecting without TLS, many servers require explicit setup; Slixmpp may reject insecure connections by default.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Ensure you have the correct package: pip install slixmpp. The import is 'from slixmpp import ClientXMPP'.","cause":"Incorrect installation or using a very old version (pre-fork).","error":"ImportError: cannot import name 'ClientXMPP' from 'slixmpp'"},{"fix":"Use 'await xmpp.process()' inside an async function, or use the synchronous version by calling xmpp.process(block=False).","cause":"Calling xmpp.process() without awaiting it inside an async function.","error":"TypeError: object NoneType can't be used in 'await' expression"},{"fix":"For development, disable SSL verification: xmpp = ClientXMPP(jid, password, ssl=False). For production, configure proper CA certificates.","cause":"Slixmpp verifies SSL certificates by default, but the server certificate is self-signed or invalid.","error":"ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed"},{"fix":"Use 'from slixmpp import Iq' (capital I, lowercase q). The stanza class is 'Iq', not 'IQ'.","cause":"Importing 'Iq' (uppercase 'I') instead of 'Iq' (capital I lowercase q) or wrong casing.","error":"AttributeError: 'module' object has no attribute 'Iq'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}