{"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.","language":"python","status":"active","last_verified":"Mon Apr 27","install":{"commands":["pip install slixmpp"],"cli":null},"imports":["from slixmpp import ClientXMPP","from slixmpp import ComponentXMPP","from slixmpp import Iq","from slixmpp import JID"],"auth":{"required":false,"env_vars":[]},"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.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}