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.17.0.tar.gz (809.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.17.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.17.0-cp314-cp314-musllinux_1_2_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ ARM64

slixmpp-1.17.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.17.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.17.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.17.0-cp313-cp313-musllinux_1_2_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ ARM64

slixmpp-1.17.0-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.17.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.17.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.17.0-cp312-cp312-musllinux_1_2_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ ARM64

slixmpp-1.17.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.17.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.17.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.17.0-cp311-cp311-musllinux_1_2_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ ARM64

slixmpp-1.17.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.17.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.17.0.tar.gz.

File metadata

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

File hashes

Hashes for slixmpp-1.17.0.tar.gz
Algorithm Hash digest
SHA256 05257ee0f2aecb42d6479f6071c89ad3c734fda0ee753eb4625ecdc6114d90b1
MD5 59b2453401dbec4850ae6fa1284f6d99
BLAKE2b-256 6cffaac46de291c29162da5f1ef45d68a6f649a538942da28b514c866b909e35

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.17.0-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f8ac50221947ad34d0485acb99dfd259d2378f5e888583c388b23bbe9832791a
MD5 c779580a191211bf946c1604f144d9b5
BLAKE2b-256 8b92278ab1616d21fbec1f1c39de401e6776b0aa5deb4cd6e971d1952b0fc76f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.17.0-cp314-cp314-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 1b7814de8f4001320ec5db0e23378f194eda6cefbd30425f5115255ca5b23bb7
MD5 7579cfa630f7cb213642c3d00be00f83
BLAKE2b-256 413b12e6c06a7b90e60a0d56267cfddbf059d09d4bd1d94e9704b426c8d2c389

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.17.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 5d6d0180b9048a4952894300046c9d93e40e8b5e52bf1e7c665a662a5ac78661
MD5 1307f346284b7d727d23e642a12b6ca3
BLAKE2b-256 88e5ce61c6d209c0016cc0681658fc616d7a22e1d600edd335c27f5fd2b1b52d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.17.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 03df6b43750501fb725db247f7f596800d467963b9fa90b974b67e1468a511d6
MD5 96de7d5f2f21051bcb229e6b9fb17cdf
BLAKE2b-256 49762b39b05e74cce5bfb134e78cff1a79fa303fba98c33bf9cff0aef3afad6c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.17.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 bf65f15f1e8dff014a305f6c7a4ec20eb71bfcf9bb2472b8daf3eb40991730fd
MD5 3a3dcb5e4f250637e366cc531dee0663
BLAKE2b-256 3a3952b6ba23f5798e0091ab2aef2a94088ec75cb5d21882abf98ecbcc90e45e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.17.0-cp313-cp313-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 c22ccadbccf90471235416a89c9af1584c0675fb235df4007d287c7275cbd4fe
MD5 23c3cb975c19174068de9224ddf43c8f
BLAKE2b-256 96d5df4997953d1c8ca540799dde1f40e5de762583d4a8d84e50697605f751b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.17.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 dc36d96ccc93604f3ab0b59e49d954fc720c275fb1af63d5c521884b54cf96b7
MD5 e7ddf66525e4685b77d09be7746b5889
BLAKE2b-256 5c559833810e774139c8b204f90de53af37a20d18b92b2afd689ae9dabc83c96

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.17.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 8f5709541857ee9152da577df4af1fcf9241b2809f2720afaf2b1d27324e36da
MD5 221b29b3b6a702a989671e789e8c13c4
BLAKE2b-256 4101a900415241b9029348fb0bbfdecad8c524b0f9313dc0cd46b1b4663d3c65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.17.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 cb40ca6dff2c677b50dec9efc967a67498844c1d984682183dd99fe3430bb59f
MD5 a424e68daccd1ed228702f8817a31435
BLAKE2b-256 c264d53cd376c5dafae2969a9d5878ca43439a6bd9ddf971ed3f4f153dc08f91

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.17.0-cp312-cp312-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 637c99c67dee1fb5c375e28153aea00cbc7ca1e9a0acd5518423acbcb1401387
MD5 4e42b1d2a6d9b8d880c6c19e4b01e779
BLAKE2b-256 43efda312c3315d6941c55f0c7ad8df377331409065d8a422e34dd4eb9100c88

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.17.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 618796ae636a65aa4b1dba1a36ba119170bf17febfdd88f27c267189e91e69c7
MD5 8f1149556594215b411b67eb0b73c0c3
BLAKE2b-256 5a5a8224e5877ccffb13a53b42e02e02c62ea1d5148456dd9978ad7b5de61846

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.17.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 9d8612ba00dc889cfe261329d74771ca5d46b1c27b56164edc1b116dfc99649f
MD5 7098373ce0c981e4f440b90f4c2258a3
BLAKE2b-256 3175524d101b7d441d03967cb8ddd161ba9689c00afcae382a07a5b4500b3ec5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.17.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 98829509c626e916c721057a686f04bc55fc142a8dc5d5a1e8604b9a8a61c0ad
MD5 d6ebaf070ae7e6155294f70dfc2a2202
BLAKE2b-256 0e6c28313ea99ad307852c5c6567fe70d9c129e845bec2c20afb807bad627454

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.17.0-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 cb2f83c369c7a0fdd6e391c84e7de0e414c178686d68cc9b07ebd725462d9289
MD5 e02575629e1c82bb68f3193c4c6f0684
BLAKE2b-256 520234f05d972f33fc2712b9af2c3dd87139e6d66d7491d05cf9bb5501e4e65e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.17.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 2cd8ef55a52fdb7eebdade72d62ac8617328bbc8716861b359260bcfb4f3925d
MD5 10cdb1fe8f1c4391f80f8b6e9983364b
BLAKE2b-256 8983fd8838431bbd78067792ddb253cb978089ff6331d4d1e17f9085651d3d13

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.17.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 8e76821d5652c24ff2146e66b22c1158115d6a19ee6004eb00b675644e2e38cb
MD5 51571daa25c3dbeb41c9d7844cc31b0d
BLAKE2b-256 844a77337fa86f4938b37b7acad137084789bffa541e774c790d67a392317705

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