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.14.1.tar.gz (784.4 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.14.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.14.1-cp314-cp314-musllinux_1_2_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ ARM64

slixmpp-1.14.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.14.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.14.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.14.1-cp313-cp313-musllinux_1_2_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ ARM64

slixmpp-1.14.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.14.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.14.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.14.1-cp312-cp312-musllinux_1_2_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ ARM64

slixmpp-1.14.1-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.14.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.14.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.14.1-cp311-cp311-musllinux_1_2_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ ARM64

slixmpp-1.14.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.14.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.14.1.tar.gz.

File metadata

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

File hashes

Hashes for slixmpp-1.14.1.tar.gz
Algorithm Hash digest
SHA256 9e232ca178d170f412f1710c809ae2a378ec2547ff3ebabdf669873353ec395a
MD5 8036808a9585acfe6e1f7a098222adc3
BLAKE2b-256 27b19fd471e004457fa80d471f5f7b214cf0b5e44cc8eb4f50282a67c679a237

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.14.1-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c34f36c2b68fdc0b9f6bc9012e09bef671fc8b76fedfc27cb9046cc4c8ac5a91
MD5 b38b8bc77154b4c550579f6d02bbef22
BLAKE2b-256 299bdba4408c2553a6e07c670b6632abe5bd963b2bfba42d77f2c3774a65c3f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.14.1-cp314-cp314-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 cc45ab981eac8e6b32830c3a273436bb998fc753cbb14b622f7950d3bed37faa
MD5 b160aa83ddfc7649c8ca36ce10eec7a2
BLAKE2b-256 e2c2ea037dcc8107a127509e37463b4f5b0a506f6123a2393840efdbe9eb333d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.14.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 375b5f342c7dcb344f89e85c94db1574099812e1ca9b444d0ecabaed80b8ae35
MD5 d803b597949e9890bf130a207674ca4e
BLAKE2b-256 aae77fcb251ff862394fc2f6ea12523b181552d51cc342ce105a0be7b22509a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.14.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 8f31ed56284d456e4b6b9b3f3bcbcad1fd8b2c6581fb8e6787b3fa7b91941409
MD5 478e7c841170943177522540d89eea6e
BLAKE2b-256 4594392520be16e3057b542bb1439e372aab00cf60318e93e851465805384094

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.14.1-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 1e06dbea15bdfd1c855efe618382db48822d16a698ef93c671f7e220bfba1f14
MD5 b94299db059d0e129d53ee7856fa5c0d
BLAKE2b-256 4ba69a696163bd84b23c49bc98900b8f6efee6e1cfaa7151386f0878510a6345

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.14.1-cp313-cp313-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 59a55227a977b683362cdeb1c08bb05b6b23cd93fbe23fad7330695dd097e52b
MD5 e2ee2e51556b3f77194cc315e1b2db2e
BLAKE2b-256 838446fc721e908e1b41536f0b571df51d4a822c1f85db63a679c007228499d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.14.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 0bee620f63ea060e1b64a71df8b3b0107cd91b6c7a9a400400905a3d9a3d290d
MD5 b2c0521323204c005d0073f943fe5eeb
BLAKE2b-256 85366dd6edeb0e891cd0bb3473bd6738036915ccf44fea31a0ee56b4b3cfd40c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.14.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 58b3dcf7712c193acf6005b82c785fbd3157e533c2cc89cfe66dabc53882a21a
MD5 d893066291de17237948726e65bc56cd
BLAKE2b-256 a3aefc897ff603bab9fec24edf1cc13e871b9a8917d15470446ec466ebce5ffa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.14.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7edf6ecda02e9bab165c122b205131960f2349657af26451b402cd362650dc0f
MD5 e4421bb58106f156fff4a2e30840df98
BLAKE2b-256 ee04708457546edb39e2203dbd2c27b97466177470fd4bef0513d3e3484cfdda

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.14.1-cp312-cp312-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 dcde4216b7b7150183544fbaa228b55915898a4f5998548b41eab405b01fc76e
MD5 3a71c284983379c2b5819073d22704b6
BLAKE2b-256 e5fa96b4acbfc7ba8ec844ec39f29cc8642f5b7a8a74e804009b9b3eebe09c82

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.14.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 4a1f191c57ea20aee40cdad101804dcc1babe83b969d1315070d08dbac78f102
MD5 2705ffb7e70c7233c05eb8c9b2321b31
BLAKE2b-256 2145033202df078971b0b72565dd3ab2057db1c29ea8ef14024d8d6b640aa162

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.14.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 fabda20d404b80accc9b327ba490a17acd1f33de0875c2b60cc58a59af18b046
MD5 e0b966d00a31758af45c880873a3b492
BLAKE2b-256 e49ab51f43fd9c839cdbb89abc6ea6a3a908d30ffada78e499b5b7a87721545e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.14.1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 eaa5918f1e6b180c6a064c775daebcaf8d06299ab2e73c6e59bf2bdd945dddf4
MD5 20e3be807646b7b56626c31f4c702809
BLAKE2b-256 69df3fe67afafa791825c33f4be1ae01dbd83fc03ca73115dae4de87d7688ea9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.14.1-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 62028d34d8fc080f0a692119e836101f370f325d6f44e31d68d8ad2de3d940c3
MD5 9145f12192f90cebadb504799f75a27c
BLAKE2b-256 cae2aa1ac50f11c7d36f25a0a004e565cdc884b897f9117026cd501f7f59e6e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.14.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 94ae77fc9457edad8e90519cdfbc0e38b5d2fda7538965408940fcc1b2fe174d
MD5 eb34049db56181794a03c900aa8d544c
BLAKE2b-256 c4dc8e8d07955fd36e1c3de44bf190bab3e46bcd4a16e7dfea03ee408cad7ab2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.14.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 5906d631a66f86eb693035c80170e489efbf8b03df1ea93b4f7492224b36ebc4
MD5 61057ffe09512060bb2e72f9101ca082
BLAKE2b-256 aecc882dd23ac054d01ab0a0801f66bd00ff85cd514103f314e9bd6e37b5aecd

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