Skip to main content

Slixmpp is an MIT licensed XMPP library for Python 3.7+. It is a fork of SleekXMPP.

Slixmpp’s goals is to only rewrite the core of the library (the low level socket handling, the timers, the events dispatching) in order to remove all threads.

Building

Slixmpp uses rust to improve performance on critical modules. Binaries may already be available for your platform in the form of wheels provided on PyPI or packages for your linux distribution. If that is not the case, cargo must be available in your path to build the extension module.

Documentation and Testing

Documentation can be found both inline in the code, and as a Sphinx project in /docs. To generate the Sphinx documentation, follow the commands below. The HTML output will be in docs/_build/html:

cd docs
make html
open _build/html/index.html

To run the test suite for Slixmpp:

python run_tests.py

Integration tests require the following environment variables to be set::

$CI_ACCOUNT1
$CI_ACCOUNT1_PASSWORD
$CI_ACCOUNT2
$CI_ACCOUNT2_PASSWORD
$CI_MUC_SERVER

where the account variables are JIDs of valid, existing accounts, and the passwords are the account passwords. The MUC server must allow room creation from those JIDs.

To run the integration test suite for Slixmpp:

python run_integration_tests.py

The Slixmpp Boilerplate

Projects using Slixmpp tend to follow a basic pattern for setting up client/component connections and configuration. Here is the gist of the boilerplate needed for a Slixmpp based project. See the documentation or examples directory for more detailed archetypes for Slixmpp projects:

import asyncio
import logging

from slixmpp import ClientXMPP
from slixmpp.exceptions import IqError, IqTimeout


class EchoBot(ClientXMPP):

    def __init__(self, jid, password):
        ClientXMPP.__init__(self, jid, password)

        self.add_event_handler("session_start", self.session_start)
        self.add_event_handler("message", self.message)

        # If you wanted more functionality, here's how to register plugins:
        # self.register_plugin('xep_0030') # Service Discovery
        # self.register_plugin('xep_0199') # XMPP Ping

        # Here's how to access plugins once you've registered them:
        # self['xep_0030'].add_feature('echo_demo')

        # If you are working with an OpenFire server, you will
        # need to use a different SSL version:
        # import ssl
        # self.ssl_version = ssl.PROTOCOL_SSLv3

    def session_start(self, event):
        self.send_presence()
        self.get_roster()

        # Most get_*/set_* methods from plugins use Iq stanzas, which
        # can generate IqError and IqTimeout exceptions
        #
        # try:
        #     self.get_roster()
        # except IqError as err:
        #     logging.error('There was an error getting the roster')
        #     logging.error(err.iq['error']['condition'])
        #     self.disconnect()
        # except IqTimeout:
        #     logging.error('Server is taking too long to respond')
        #     self.disconnect()

    def message(self, msg):
        if msg['type'] in ('chat', 'normal'):
            msg.reply("Thanks for sending\n%(body)s" % msg).send()


if __name__ == '__main__':
    # Ideally use optparse or argparse to get JID,
    # password, and log level.

    logging.basicConfig(level=logging.DEBUG,
                        format='%(levelname)-8s %(message)s')

    xmpp = EchoBot('somejid@example.com', 'use_getpass')
    xmpp.connect()
    asyncio.get_event_loop().run_forever()

Slixmpp Credits

Maintainers:
Contributors:

Credits (SleekXMPP)

Main Author: Nathan Fritz

fritzy@netflint.net, @fritzy

Nathan is also the author of XMPPHP and Seesmic-AS3-XMPP, and a former member of the XMPP Council.

Co-Author: Lance Stout

lancestout@gmail.com, @lancestout

Contributors:

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slixmpp-1.9.0.tar.gz (709.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

slixmpp-1.9.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (990.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

slixmpp-1.9.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (986.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

slixmpp-1.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (990.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

slixmpp-1.9.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (986.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

slixmpp-1.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (991.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

slixmpp-1.9.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (987.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

slixmpp-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (991.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

slixmpp-1.9.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (988.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

slixmpp-1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (991.2 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

slixmpp-1.9.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (987.9 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

File details

Details for the file slixmpp-1.9.0.tar.gz.

File metadata

  • Download URL: slixmpp-1.9.0.tar.gz
  • Upload date:
  • Size: 709.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.3

File hashes

Hashes for slixmpp-1.9.0.tar.gz
Algorithm Hash digest
SHA256 a89dfbb9b07a5eb16fadae71e56205a0e52a6133941d78fe514d046c58ac1b0a
MD5 ce6995ff3817a475fff1d8024707c567
BLAKE2b-256 538143c9f0a4b78f428c19344a35d5b1ff68b72c5c4a093c0b8cc67a48dd9730

See more details on using hashes here.

File details

Details for the file slixmpp-1.9.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for slixmpp-1.9.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8f62cec065ef50f0622bcc8e153188095dca7090eeed973358ee7ddfa6451d69
MD5 9f4977611aaf19acf519b202f36234d2
BLAKE2b-256 be44210974ac73a5e62421eeafb6c40df6b915c65c92258988985c7bddcc8527

See more details on using hashes here.

File details

Details for the file slixmpp-1.9.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for slixmpp-1.9.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7a0bfa07b82d8700aedb523bd03bbcf7b079bc8bd202681124125996aab13181
MD5 a4bca1462373e0205e70120141792c55
BLAKE2b-256 6fd26bfb40a11c1682caa5deade81209ba8ef0396e6be8ca330f41177c27e1e8

See more details on using hashes here.

File details

Details for the file slixmpp-1.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for slixmpp-1.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 65fb4a1e76ee74d7e75f63c349c62f27f0da1fba31c6f73a2308b6b0325dfce4
MD5 11d0c07ea2fb1656ffa4d4dbedb231ad
BLAKE2b-256 56e20de38930b7e3d2eba82e41756eca0330d30cb4836afea24c985fec8fe175

See more details on using hashes here.

File details

Details for the file slixmpp-1.9.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for slixmpp-1.9.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0ab248f24450c33e0509c62e1c1239f2c42a230ca2933974759ee1e3ed74dc05
MD5 87a1f952ece2f559b21ca66400250a6e
BLAKE2b-256 240c73875d5247bcb3b99d6785a0e7d4bac33ed0c81535240104f1b5af9f6c6d

See more details on using hashes here.

File details

Details for the file slixmpp-1.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for slixmpp-1.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 857b70ba24216c40260228a88153efb7c084c0a356ceb9f856bd25712d7099d8
MD5 29b606cc2feaf2bfb0bddebf27d1628b
BLAKE2b-256 3f8ada74bebaff24a31242815c1003c0646df3d1fff6010b7f8fd5ecbef0f1c1

See more details on using hashes here.

File details

Details for the file slixmpp-1.9.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for slixmpp-1.9.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cf0074167178c207c08ec544559a568a3d188e03aba68d3a22c72295e3f6d24a
MD5 d775ed28509157c49d9eed6f1ce7de24
BLAKE2b-256 ae51348905e81075a53c7718d74c3b70c379b9c0d2a845c8fbe6d41fab53a436

See more details on using hashes here.

File details

Details for the file slixmpp-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for slixmpp-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a83fe39159eaf59bd801f5ad436f6631d93c169d23ba425b5ee3405abf4edd3c
MD5 a83deaf701a80817884a1dfd5551d002
BLAKE2b-256 9433308cec94bb0abda1a552501464a3d6ef7bc0b68e14736748075abed29ea5

See more details on using hashes here.

File details

Details for the file slixmpp-1.9.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for slixmpp-1.9.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 af81ada6f8981712ca5f2d5af82213461a056878c5cd8e52fb91c6bcebc16a53
MD5 08d4774805ecf8cba0f826774057c876
BLAKE2b-256 f7dc5c2e69d05cdeded03ce1c7d8e1a2b70edbe70486449881283bf780793f96

See more details on using hashes here.

File details

Details for the file slixmpp-1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for slixmpp-1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 eb6fe45127bf2b79d551266d526bb99aa6df08c0c477e76c4d7b407a871cf140
MD5 474efedd7f79bc0ef2011034ab8fc17c
BLAKE2b-256 b412b64f5164a899738877d19fe0e116a0aee6149dabc52ea290aa4b2e559ddd

See more details on using hashes here.

File details

Details for the file slixmpp-1.9.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for slixmpp-1.9.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 bc5622222bf8058bde07cb5c8093f6cf8b5d13b1f7a81b212c3ec5d53fa0f83a
MD5 4f0f32b1ef856a06b78787f834ed9bdc
BLAKE2b-256 26c723cffba82fbebbbdfec9b977cf39e9ae1e64256c5be2ee12e4e1e27d6cf4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page