Skip to main content

Slixmpp is an elegant Python library for XMPP (aka Jabber).

Project description

Slixmpp is an MIT licensed XMPP library for Python 3.11+. 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:

Project details


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.15.0.tar.gz (788.8 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.15.0-cp314-cp314-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

slixmpp-1.15.0-cp314-cp314-musllinux_1_2_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ ARM64

slixmpp-1.15.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

slixmpp-1.15.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ ARM64

slixmpp-1.15.0-cp313-cp313-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

slixmpp-1.15.0-cp313-cp313-musllinux_1_2_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ ARM64

slixmpp-1.15.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (999.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

slixmpp-1.15.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

slixmpp-1.15.0-cp312-cp312-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

slixmpp-1.15.0-cp312-cp312-musllinux_1_2_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ ARM64

slixmpp-1.15.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

slixmpp-1.15.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

slixmpp-1.15.0-cp311-cp311-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

slixmpp-1.15.0-cp311-cp311-musllinux_1_2_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ ARM64

slixmpp-1.15.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

slixmpp-1.15.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

File details

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

File metadata

  • Download URL: slixmpp-1.15.0.tar.gz
  • Upload date:
  • Size: 788.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for slixmpp-1.15.0.tar.gz
Algorithm Hash digest
SHA256 592b53c1545370633d2f2b8d3ba284ad21c3cd2ccc392c9402cf4ad4307c24da
MD5 f8983150a511e60f21eac4ba1210f641
BLAKE2b-256 8178537b5e444a4ee15148f2ef97cd3a09b7d3e56f3f3ec9f73a0808db890f48

See more details on using hashes here.

File details

Details for the file slixmpp-1.15.0-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for slixmpp-1.15.0-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 358453bf86d3edb9d9f706ff1ca7d4d8f2ead32898639d0fbb69861265238bc2
MD5 5bd4ea372737aebfd13ab4beaddc04be
BLAKE2b-256 4d145607c46f68026255e746f4b027b7271ac48b1a61f5c9f697573736de3406

See more details on using hashes here.

File details

Details for the file slixmpp-1.15.0-cp314-cp314-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for slixmpp-1.15.0-cp314-cp314-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 e05a0c9780d2f2beae4953ed85cd33928d2077f3c3bf2e8e8d01958b763d2595
MD5 a461901ee0a4f433958433d9d6669f78
BLAKE2b-256 d3b0ca2a8ea1542cebd1a95dd5944144781abd15e948b889e2838acf9ddd2165

See more details on using hashes here.

File details

Details for the file slixmpp-1.15.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for slixmpp-1.15.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 edd9126a2456c6f9478b40e8fef1963e0a0576d1ea696634536d871920059e34
MD5 6680b6c8c3d47835df17ec9d884fe7d1
BLAKE2b-256 e8985d9e3386faa8f13d10365ee1fb715a4bc2b773bbc55444ce019211848645

See more details on using hashes here.

File details

Details for the file slixmpp-1.15.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for slixmpp-1.15.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 3ebb1187fd4734325fb6ed270f849d574a6083344e1cca05d8a51c1f4299f446
MD5 c7c6e8c9797fb8561faa2b5621bb3a97
BLAKE2b-256 be70e50ec846adc72290467fa76446bb39e858d2596fb68747cb546ca8d9fe7b

See more details on using hashes here.

File details

Details for the file slixmpp-1.15.0-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for slixmpp-1.15.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b0a9f27a80d2bce7f6403899e9908657d9554facc51035ec05e0075de43fe64b
MD5 3fa0ea05eecb3b0092a3a4f7d2efab01
BLAKE2b-256 d983f02d71e5c7e6cf274c78a1e6fe32c19da8a941b03a6911b2398292aeb3e6

See more details on using hashes here.

File details

Details for the file slixmpp-1.15.0-cp313-cp313-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for slixmpp-1.15.0-cp313-cp313-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 d00660e0923d636f040b6c1cc17d24f33ffc8857252c051f45ce06b2a236a5e2
MD5 cc2615fe4ba63f35819ee180ab6850f9
BLAKE2b-256 e9e5c21e62567a940f199c0364f245d7b774387473c4569a907bad9ed8fc2376

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.15.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 0982f55e95d38c09a2418f892aed7f9bf3b74446aec54695c82ba30425977285
MD5 d3f57a91e891ebcad9c317211389aee7
BLAKE2b-256 2e48c3a189f948e9e4ad5049853a9284e6f27d0986fb8b7a0418cd8ebc5785b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.15.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 7a8118ce6f35739c5ea49e8428b0af382d943441a6e70c403f0ba9993a978416
MD5 6aa363b1fdce28d76a994681a480a3e0
BLAKE2b-256 92b512d946ec48747b1d65ca26a9c84ac445423bdc6714547e243bfd8f07f53d

See more details on using hashes here.

File details

Details for the file slixmpp-1.15.0-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for slixmpp-1.15.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 aaea557d7207b466277ec459f707854f25268e33e5e391f94d0534ac7ce5082a
MD5 ac9fdfdd4721d096b3a9927dfcf901d0
BLAKE2b-256 3816566259f5607cda28679bc2c3407ede1f41626de788e6666ca76a6e2c29e8

See more details on using hashes here.

File details

Details for the file slixmpp-1.15.0-cp312-cp312-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for slixmpp-1.15.0-cp312-cp312-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 348d1aeb3400b56a05ddc964f5d76d5ea8ad9f727b3be71b7986085133e597fc
MD5 8b70718d052ba0b39186f47824457ca3
BLAKE2b-256 87fcd9f6d1540e5974786ea5931f896fddd6a50f14c35fcfeb7e3d7217a36537

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.15.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 fef89c9cb04baf4645230080e30e4a5e29d85d9bd66bd47850ac2d6eac5ff466
MD5 72f25874afede6e89178bd178244b796
BLAKE2b-256 6a9128f16a9a4a944901d11b7109d55f9f05b71092ea3a17f397ca7538f33c19

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.15.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 922830afa9ecee36e40fda4a95e8bc8a39dffa6acc887b2da0a8c5c928fdd4b5
MD5 24c22113781b134a87470f0a16185a52
BLAKE2b-256 12779efb4b4f9962856de0ab19db5fab3c96e7744f0b141e6f02d686f33cdc65

See more details on using hashes here.

File details

Details for the file slixmpp-1.15.0-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for slixmpp-1.15.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d39d6bde5a325cacb8a7c6ce74bd7a3da47d527ceef3675b0232c5771b236460
MD5 8fb8a0ea32fd423ccbb76bfbfd4e7c72
BLAKE2b-256 fb43a51e69f568d36087afcefa713dac721fbe08140c80327a9d4cd98cd3c163

See more details on using hashes here.

File details

Details for the file slixmpp-1.15.0-cp311-cp311-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for slixmpp-1.15.0-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 eab21d11faecbbd3b738c0e592c0a11e1e6d01723143dca23da2de9f647045b5
MD5 c0f357843686c39a82e47ce81546ae28
BLAKE2b-256 6a6c2f698b8bfb3866108b3146dce3e75fb2291864c4b14669524f7ae780e8d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.15.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 4992cd954467fb18bc7782fbf25c8b4ae3aaa8fd31395f4d9bd90a5007181130
MD5 00b0867653c4a660f33d2d3359325737
BLAKE2b-256 7d83b09a7f1db5c3662e339bd7dd265c1dc4ed6aeb092c67202a0ba9b2de7407

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.15.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 ef22fafe8d2dde75f1a630903d26866acab23a1bc39fe7c5d6df250f43c380a7
MD5 b1f727fc3049e1ffcddf92da8f725785
BLAKE2b-256 c2b726340671a1a25f93e647fd2c28b9346ee171099052d5c7ad3c2fe988ed37

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