Registry / communication / slixmpp

slixmpp

JSON →
library1.16.0pypypi✓ verified 85d ago

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.

pip install slixmpp
INSTALL
IMPORT
SIG · SLIXMPP
S
slixmpp
communicationpythonv1.16.0
Install
2.7s avg
Import
473ms
Disk
30MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.12.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.402s · 30.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.7s · import 0.354s · 31MB
30MB installed
● package 30MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ClientXMPP
from slixmpp import ClientXMPP
import sleekxmpp
Slixmpp is a fork of SleekXMPP; do not use SleekXMPP imports.
ComponentXMPP
from slixmpp import ComponentXMPP
IQ
from slixmpp import Iq
from slixmpp.stanza import IQ
Iq (not IQ) is the correct class name; case matters.
JID
from slixmpp import JID

Connect to an XMPP server, handle session start, and echo messages back.

import asyncio from slixmpp import ClientXMPP class EchoBot(ClientXMPP): def __init__(self, jid, password): super().__init__(jid, password) self.add_event_handler("session_start", self.start) self.add_event_handler("message", self.message) async def start(self, event): self.send_presence() self.get_roster() async def message(self, msg): if msg['type'] in ('chat', 'normal'): msg.reply("Thanks for sending: " + msg['body']).send() async def main(): xmpp = EchoBot('user@example.com', 'password') xmpp.connect() await xmpp.process() asyncio.run(main())
Debug
Known issues
breakingSlixmpp dropped support for Python <3.11 in version 1.14.0.
fix
Upgrade to Python 3.11 or later, or pin to slixmpp<1.14.0 if stuck on older Python.
affects: >=1.14.0
deprecatedThe 'message' event handler 'on_message' pattern is deprecated; use 'add_event_handler("message", callback)' instead.
fix
Use add_event_handler with event names as strings.
affects: all
gotchaSlixmpp uses asyncio; do not use time.sleep() inside event handlers as it blocks the event loop.
fix
Use await asyncio.sleep() instead of time.sleep().
affects: all
gotchaWhen connecting without TLS, many servers require explicit setup; Slixmpp may reject insecure connections by default.
fix
Set socket.ssl_version to ssl.PROTOCOL_TLS_CLIENT or disable SSL verification with caution.
affects: all
Errors
Common errors & fixes
ImportError: cannot import name 'ClientXMPP' from 'slixmpp'
Incorrect installation or using a very old version (pre-fork).
fix
Ensure you have the correct package: pip install slixmpp. The import is 'from slixmpp import ClientXMPP'.
TypeError: object NoneType can't be used in 'await' expression
Calling xmpp.process() without awaiting it inside an async function.
fix
Use 'await xmpp.process()' inside an async function, or use the synchronous version by calling xmpp.process(block=False).
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
Slixmpp verifies SSL certificates by default, but the server certificate is self-signed or invalid.
fix
For development, disable SSL verification: xmpp = ClientXMPP(jid, password, ssl=False). For production, configure proper CA certificates.
AttributeError: 'module' object has no attribute 'Iq'
Importing 'Iq' (uppercase 'I') instead of 'Iq' (capital I lowercase q) or wrong casing.
fix
Use 'from slixmpp import Iq' (capital I, lowercase q). The stanza class is 'Iq', not 'IQ'.
Upgrade
Version history
1.16.0latest on PyPI · released Jun 8, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
20
OpenAI (training)
1
Resources
slixmpp — pip install slixmpp · libregistry