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

Uploaded CPython 3.14musllinux: musl 1.2+ ARM64

slixmpp-1.13.2-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.2-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.2-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.2-cp313-cp313-musllinux_1_2_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ ARM64

slixmpp-1.13.2-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.2-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.2-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.2-cp312-cp312-musllinux_1_2_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ ARM64

slixmpp-1.13.2-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.13.2-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.2-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.2-cp311-cp311-musllinux_1_2_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ ARM64

slixmpp-1.13.2-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.2-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.2.tar.gz.

File metadata

  • Download URL: slixmpp-1.13.2.tar.gz
  • Upload date:
  • Size: 757.7 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.2.tar.gz
Algorithm Hash digest
SHA256 1b6f7c4c273ae5d34c4e54f6d66984a27467de225312f19f942f971f38b78da2
MD5 bb1cf0f9fac2ab8bb47dc91ebad00a49
BLAKE2b-256 8b1c6ce021fb5524b41330d583956d1ff8e508c95d6c1bb0ed34790e754cc8d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.2-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 66002c8115755c31ac1ff47f36d14679346aea632fd9cc3e098c5e9c2b19913b
MD5 f56189c85de4450546c303085aa8a967
BLAKE2b-256 5c0dd166889d37899257f7811848212a48ed9571daefbece76ea389d4f2ff74b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.2-cp314-cp314-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 a84d70c071790d372af6a39cec0c7780f90ed7d5779d2bd420d4a2b9c3343b41
MD5 5df9c85e6196f1bd8ca22372e0b95008
BLAKE2b-256 aa028e6a45ed9ed60b28fcd9069227be58ca691a589411424315eee380a9a4f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 7aac6108696125f5689bceb76dabe9e759bc65626b599a85a5cf7bccede7d614
MD5 4902c45ee01cf9a644685ec0f0777730
BLAKE2b-256 9017e31b2d81ab2801468975e2a1faa17e57ca1a2be638d866f1e9ad3aebcb1d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 c2c366cd2a78fc8d1dec97a183a48020e388c283d7a8080378b1b0cf70e84582
MD5 ce61b3fa87ff06ada2fa99cf38f2839e
BLAKE2b-256 3e59036478ca97a950c9985e521b19b4d3853bd0aa76e837f26281e93be6b5cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.2-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 004886aaca85aa311564f062fcd7318773e74cba58b4833209bfa248c7433093
MD5 41773879228891119d59510971bab43c
BLAKE2b-256 f044724d3456f5d61ffbc11c65266b7c43ef122303662a8a566d3e954faf6955

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.2-cp313-cp313-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 ee5236511703ecd2b3aa7320ace7efe0297831fbb5d1d9573eee97b4e6dc8c5c
MD5 ddf7b9ebdafe7c448ec048cfe7675d7e
BLAKE2b-256 f1cd33553e48075c0496034622cb744e5b24715c3580591eddb1f65262b62100

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 11a946eb5335d2016d7226819bad1c45f282f67494ba5aa70c483d4f19e9b5ac
MD5 a73d81438cf543e7b752e4d3ab88595e
BLAKE2b-256 fd1ae4777daea299b034fefc62e47ed9d2ae12267340ded0731620b941fa4829

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 6119db1b60e1958913932820ceea7508b07232ab7bfbbd37bc5c3ab801e31dd8
MD5 08e858ba61c09bcbf3d64c0ff5f7254e
BLAKE2b-256 d227cab69947c0d9e910493fb04d96048e7250640f1ce912b59a4ea2be8a6f8b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.2-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 33bb56bc81bd1923ddca778385aabe5be7b65b70677175c6657d5687e52d47dc
MD5 b5662f533ea61a880c47ad0230cb5520
BLAKE2b-256 dd8d87d957b43bc8d494f4e3b1484b7d88d016b87e8fba9e797778b296458253

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.2-cp312-cp312-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 e3bb60fe14811892269f56acb1977cd1dc164548e42f5cc12493c5c7ab16df4c
MD5 7c16567b1a1bc9a64f65e35a77d7bd93
BLAKE2b-256 ed967ecbeca3e718946d854c2f245ddc232636432f0ef3b6b1466e422e1eab7e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 a3490fec00e1f18dec3ab9a6f154c3d23dc7a0718472d7d76a1b36b9fcec633c
MD5 4069ae348624bcec6181fee261ade6d6
BLAKE2b-256 9df84497dec350bb502853e7b04d67ca0c87ab12bce16a233ae97878dddaa0d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 7ffa20a6b9cf7031d0c008d4fd58f8d445fcf587609223eb79af2f1addc72e5c
MD5 f3724b2781d0793efe14982acfc4fc66
BLAKE2b-256 bcd4f1fb410b137b3ce8b879e82fae321404a03e63d348a8b23c6e4c93b76f74

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.2-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9d5a8a8e0ab711f23d287111ebdb89c8f324dc84a5c6319809d5bc1669726273
MD5 09fce5f8415403e02ece161f8db21f27
BLAKE2b-256 31371ef2cb8a15cceaada5700c5c08d7728eda2ba9c0f10a6cacaf9b8ab2bfd3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.2-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 237900731f718fd0eb911cb0edf5be5198aa31f2d3c88350c57a78f7ea780c70
MD5 9a51a8c6a7afda45037502b7e1d09d06
BLAKE2b-256 802eca359e6feeac6b2a5e98c621eb50f4fe89001b91102d37f31b8fe86db520

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 772fe0cbfbde3fa33aa9553f7a3a88dd2a1b296080111b09703bb2bfd1fa4468
MD5 301c9fb9c7a9f03af311ac6672c6dca1
BLAKE2b-256 21500627c9378726a4565b1f0bdef4b8817384dc424b6e28b845204198193ac0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.13.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 7f7c48d5bc79166abcdd43b00de3ee3e7a0c118d9f2951e8237ef43e669aacf4
MD5 b41a4574b47b83fab1444fee72a5d4d6
BLAKE2b-256 cce2f0b4930b8c2d6a5eda893ac0abf52dfecfbe11ed919f3eee1400a4774d76

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