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.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:

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

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

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

Uploaded CPython 3.14musllinux: musl 1.2+ ARM64

slixmpp-1.13.1-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.13.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

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

Uploaded CPython 3.13musllinux: musl 1.2+ ARM64

slixmpp-1.13.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

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

Uploaded CPython 3.12musllinux: musl 1.2+ ARM64

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

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

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

Uploaded CPython 3.11musllinux: musl 1.2+ ARM64

slixmpp-1.13.1-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.13.1-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.13.1.tar.gz.

File metadata

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

File hashes

Hashes for slixmpp-1.13.1.tar.gz
Algorithm Hash digest
SHA256 f5867120001c5054343178c28e43491a4d3cf0c585de3f1aa7a4da6e3106040c
MD5 ee4a494175a8746f59dd0d2daacf41a4
BLAKE2b-256 f52f1654f73e071c9865950fef35a92680b6d917dfad7b632afc733ead89d393

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.1-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a140d13bf8d918a53e5494afb58f93ea8ba0e71c08073160cf06438e2db231f1
MD5 f3536bf1500b5e575b0227e9b953779d
BLAKE2b-256 c6d7b92a100b077dd2a3a5d8be953bbf1da8c247bdb3d40babf7b7621627120a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.1-cp314-cp314-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 f6a693a0a90420309282f52d850337af1264584170a67669f4434f0a1789a4da
MD5 2675b4013816d9ccf05212b9ee090b3a
BLAKE2b-256 4d9712440f9d1218771d3fcc9e8425c664e2bfe4e1dc89052ede6e4d40f2c72e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 e93eba9b10441293c3bc812f30681743a8eb66308b9dede1945331fdc91e334e
MD5 88fefbfefe136d6f39e6ca14823ae7fa
BLAKE2b-256 a2c1e708ac654ecb9a260c201b07209ec3d70d17ae695a62288b5cca95b3e2a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 363b746e8321dc90593611e94934d6b555eabf77797ed0baddef02305851c821
MD5 5b820fba26b127c7296b56db8987b672
BLAKE2b-256 df004bf4a5789afc53b730737a8f2fe0e0ab1329d5be048d1d756207ab70a3e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.1-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 da125cd2dc6a99e9b6dcef7852b944210f9067dc03776fda9b05b981c56c92fe
MD5 c2ab7c6fd1f6893a139d4fffeddf2837
BLAKE2b-256 3f74434b129c2cf19200adcc9826e5670d100dc60f76dac2ebf920fe883abe96

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.1-cp313-cp313-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 372a323ad8d8f8cd7cf53067aa8a3475d51c3af53a88be1aeae61b784ecd7954
MD5 ba6a9490565e4f7a06c325de514dc09d
BLAKE2b-256 9886706bb81b87628cddd9809f3035c82b9216a8fae49ca8a98385b653601810

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 868df469ea9071e9a74a18b79432a8196cca0ae544c232fa31b367622c5d74be
MD5 3abb5d456e19fb17f9aea3750cc77120
BLAKE2b-256 7930c50efb785d77031d79ca0ccfde6a6b236b34226260d178b5c1396905f8d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 0a4b74046bc722c74a3fd5ef21ea8779a3270bb1eaed31d4fde7649363785724
MD5 7a3d0f6ebc67fc793250b1660a7f0655
BLAKE2b-256 ff23e997ff9482da7b33927ebe824ae5d79dd981232dd1ed4b80b90c6f0dcd48

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 139cddc1743f5a337b55f10223bc8a2b25b11c952c3c4303708d58c9ed3be880
MD5 0de03077c6d878a54d3388a898b35651
BLAKE2b-256 87ea2d428fc6209a2f6f043613931ebd25b4a6832bf0b8eb6b6c50347eec94a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.1-cp312-cp312-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 4d05525000de910cfff39f6e0dc052caaeff10990c2a7aacc83dfca8e441d82a
MD5 18471451b34663399c5cfc0dea51610c
BLAKE2b-256 7ac4ef18f5b63cf01efbd3b0dd66ec90e98c6b205cde6cf875e0f7c9baa2c7ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 82a7bdea36662bda9e9aeded0a74db17e4a851d146570ea4532d092f54542592
MD5 2c90a3944707694b45bc0dddcdae7405
BLAKE2b-256 183dffd83791516d59b8c5721953c0ef852fd5b58a23bdec3e380f9e4fe10309

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9e5003a6a164cf2975465516b427abc8df282a4b79a81ff82a41f20647bf1d3a
MD5 8a8986044970acba74c698fcb774cf50
BLAKE2b-256 c76ccfb7321f7f3c31ca290f1fb79ef2f5a5a02482456e515e1e6a10b8365bf2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.1-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 fd815d41efee23597c95eca889c566cee848762d2cb5332b0717a166832a80c6
MD5 449a97c293971f99fc8e1a12d6c1f654
BLAKE2b-256 4073c2c0f3489147da2a75ef09f7dea608df23dc3b05381a287c375cca4e79ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 ed714f3e7139e174f83538f0975fc0a07c499413511eb049d12357d046c3b1a2
MD5 dd07cc03bb3043404317df658629d5f6
BLAKE2b-256 2c422be1c0bf72d87c71362e0945f2ecc219e34cbb69ba77a5613c69d2be827f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 c3e429f6b7dcad63a17b22aa58963592582a06504520dbc58762b74bfdb124c2
MD5 2338d36a86793f46a7fcf0308664540e
BLAKE2b-256 9c54e215f11660a0ec09680a810b1f9e6acf1f200bc12c08a8b541245da4f07d

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