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.12.0.tar.gz (715.3 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.12.0-cp314-cp314-musllinux_1_2_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

slixmpp-1.12.0-cp314-cp314-musllinux_1_2_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ ARM64

slixmpp-1.12.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (931.9 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

slixmpp-1.12.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (917.7 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ ARM64

slixmpp-1.12.0-cp313-cp313-musllinux_1_2_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

slixmpp-1.12.0-cp313-cp313-musllinux_1_2_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ ARM64

slixmpp-1.12.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (932.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

slixmpp-1.12.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (917.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

slixmpp-1.12.0-cp312-cp312-musllinux_1_2_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

slixmpp-1.12.0-cp312-cp312-musllinux_1_2_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ ARM64

slixmpp-1.12.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (933.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

slixmpp-1.12.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (918.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

slixmpp-1.12.0-cp311-cp311-musllinux_1_2_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

slixmpp-1.12.0-cp311-cp311-musllinux_1_2_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ ARM64

slixmpp-1.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (933.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

slixmpp-1.12.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (919.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

slixmpp-1.12.0-cp310-cp310-musllinux_1_2_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

slixmpp-1.12.0-cp310-cp310-musllinux_1_2_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ ARM64

slixmpp-1.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (933.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

slixmpp-1.12.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (918.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

slixmpp-1.12.0-cp39-cp39-musllinux_1_2_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.9musllinux: musl 1.2+ x86-64

slixmpp-1.12.0-cp39-cp39-musllinux_1_2_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.9musllinux: musl 1.2+ ARM64

slixmpp-1.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (934.1 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

slixmpp-1.12.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (919.5 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

File details

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

File metadata

  • Download URL: slixmpp-1.12.0.tar.gz
  • Upload date:
  • Size: 715.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.4

File hashes

Hashes for slixmpp-1.12.0.tar.gz
Algorithm Hash digest
SHA256 7469f6dcaf5742fd62e0e66ee447c5338a74520c1982a70784e7b790def2fdd5
MD5 29b8beafb78b2947bc23b0534c97f8aa
BLAKE2b-256 d903925a18ce8aced370a5135b3e0ef870ec71a30da005f747891c83df98ca53

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4ec2017578e19fbd7937a9f35368b872bb117e8fdef579e37dc2a0317916dea5
MD5 34624d8efc78083d3a8bb4168730bd0c
BLAKE2b-256 725cc78e03989639d693ede4c44d60c2cfc090c82b6b8498a1f04b1fb3bd6510

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp314-cp314-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 86b7fcbfc9e0f15d7b3e22925fcc3f35c62abde2638de5ebd617d89d8767d90c
MD5 fbc62cbd198fc918c648d92d85cc2368
BLAKE2b-256 34fc64a9fc4557c1af5cfe0c2d35eee457d5cf87d8191e99ebdb793048dec123

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6d8d951ac9482f097dd56e133c4ecccb32baa6b21416100e5541862cc3696456
MD5 ce7a35c742e17029f7b90ba3f9b002e6
BLAKE2b-256 2e6efa13ff077c3d4240491529d5ec7de33a1dc7d853aea28eb0ac04977e8542

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9fe865e978cb844c45f59096b31d2c5bc1e9fae3bdf59041c2e9e7386628f6d8
MD5 d550cd5353f15f594b464e484e815283
BLAKE2b-256 c18c2ea564b2c2e7496b9688234303f8427b33fb87a591260227b7cf35f922dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b5e07b67ed43026bf0b57d3c716562d0671b821d0a674fb3af16e33474412c48
MD5 a062f5b1a81ef974872e7f0f81a9897c
BLAKE2b-256 eedfc4cbe8f2676b45778764dad94b399db7693d4a9206aa4e36bd0475104362

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp313-cp313-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 76bec849f00fc6c320ad60bdf34e67b17a8ae93c491cb46c738ed16d8343805f
MD5 b669f727b9f3a0c85996532496d757ff
BLAKE2b-256 dcc343c704420df144a689c993dac44bc2ae9c619b2685071deff15df75d462c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b93f299890930fb4cd3eba38821cac68988e262cc4f0d56cc3a97c3e776c752d
MD5 9db0822f0fe26c571651a81b0a69640b
BLAKE2b-256 180f8ca3b12c77d1b95860e8766374ae4a543bfecc644e108ae9b57160700305

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d58c647fea0aa068a79422bf012a47dfdd785a9cb7dd2c32c63033974015afc1
MD5 13fb7536bf577e0382e696441e7952d2
BLAKE2b-256 17cb0739c6eabea5de120e5b6642ce2a4b94e175795784a853619adb7caaf4be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 689d9ace89e9732c184a64256276ed0641abed6e053cbb1be7f68fb1ec69e600
MD5 11e613c23fb0c224796b0cfc4261500b
BLAKE2b-256 725b620d852216cc52dd24537bec47404427c16ad6eac915168ac318db856f48

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp312-cp312-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 b181cd34548de9472512ea0d7dbd2b6c9627c93e8186a4a8db7cd1b6c1b75581
MD5 e55fb20cd0edddc5d5e590c59174694c
BLAKE2b-256 d4664af6374400f99ffa35c5019ba36f05f86748cc3e4e2a1fa1f6204bc4ac7e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8bd503ee0c929632e38d96cf5dff320a9c8961d1591b167724dfd906c3bad5a4
MD5 529fc5b54716db89bbb6aaf6e4a603e4
BLAKE2b-256 1e2d7ca1bfb4f93041f04b9ea93d3056236b6a4420e0099a9a1a65ecc271b91a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b5dd8d3364de5bca171172251bc77ccabe41d23062406c06c21394d3daadca1a
MD5 fd14130a3093b1e69c0e7e338ec39f46
BLAKE2b-256 40eedc9d302f60a15cdc74734e25be56aba5c4eb8ee7b4afdf64a5d5e754486b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d00a08a6cc41f54046c24989ee46b98c67f41f7208d93b08c98b4fa7b1e945ff
MD5 0d61689d17e2e1fe9943b9d69e91d3bc
BLAKE2b-256 9f6b30b64bae8762c61b2d9c4dc91cd5633617b728bf69660134fe027e65f29e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 45551f2aadb2f569dae7fa6d9cb8a08547fc16b431a55767ff87777402081542
MD5 994facbe36e8f8068b7d97dafa7598c5
BLAKE2b-256 163d6fa8908b21c271236d211ddd4c9aafb4ab780052670f611e9a11e80bb86b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e96ccc47b65f35da1cba14304af1e49092035ed2c105665dd3cd78de5b18169d
MD5 d27e349eee501f3d94c74b15d724edbb
BLAKE2b-256 c930fde40d6d3256c2e61d7b73e6a8594d979388112362e9426bc18e06652722

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4309b2048f5939edbbbb7114d33f83d0d34d358263bdec36d7670108fc3c9caa
MD5 0baad5129d38d8537dd857825a0b696e
BLAKE2b-256 a91ef3993d7338174149894583bf4b03b8fec966178dcf4d7c392240c01d1561

See more details on using hashes here.

File details

Details for the file slixmpp-1.12.0-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b0f1587a23e56b821ceb921e1fe9ba825a65fbbf39b85c4620fe510ea270872d
MD5 e54c78169f6ab22ad222eb709784422a
BLAKE2b-256 080f5d4cf4119a548296c647a1abead1e704be212f7547f5e41e744125207934

See more details on using hashes here.

File details

Details for the file slixmpp-1.12.0-cp310-cp310-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp310-cp310-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 2fb0663122b32d22ab0cd4ff9a911a76b3fea6c93f54c3229714a235eb48716d
MD5 ad6ea6ec8f7047e213012b8d74da8401
BLAKE2b-256 85f06a6460aa771e0926bd98e955db7a858cb8a93bb8d803c2e66722951c4f8f

See more details on using hashes here.

File details

Details for the file slixmpp-1.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 abdc903b11a609bdb1b12910d3e07bdadfdc4dcef8a3bb403d0bfbfcc1f39b5e
MD5 6b74f14fdfbc2050bb6be0f2d77d7229
BLAKE2b-256 ac8a3a742de69fa3e75e827f05014fe566929774a0e338e37e32fe4c80348bf9

See more details on using hashes here.

File details

Details for the file slixmpp-1.12.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 325556fa24ad493a6f102d3904ad44ee96004b3cd7434369ec8aa2f0d00505bd
MD5 cd4db9bc89d0e6c9ce48926b23f75263
BLAKE2b-256 8bd5eced05bb7541ac1a53f3254d9e130c8bc9b9719fe2069bbec4853542a6ab

See more details on using hashes here.

File details

Details for the file slixmpp-1.12.0-cp39-cp39-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 29560838a4faabd618c256a3d4bdaf603da206deb937cdfb7bc5d1fe40c5c645
MD5 7db35dbc0f4a2a7f49ec55430f33e703
BLAKE2b-256 a37cc94ece1edae3e79acec75782146a00ab512eec30eca16cf167f90ba3a199

See more details on using hashes here.

File details

Details for the file slixmpp-1.12.0-cp39-cp39-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp39-cp39-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 ca701a6ba21228160bf9850c32a38cabc6e6be626b1bd379f6e2803d7ea3998a
MD5 e0c575d5d241fc7023fe4f4a61a3d30d
BLAKE2b-256 369454089bb2ee484082ae70a8ac6925241ac34a7e34f7da3903f251e07ff727

See more details on using hashes here.

File details

Details for the file slixmpp-1.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d74e23d531ebad16f511920f16cc3d1dc51fddfb959f617ee1e2884395e5ea18
MD5 a61b9d887ee2829fbb22dc8ca2a3ab71
BLAKE2b-256 50192e3586dbdd0347f4b9ceae5808d0b94ea70844b2a8f27578fcb9183c9a57

See more details on using hashes here.

File details

Details for the file slixmpp-1.12.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for slixmpp-1.12.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 eb1e28ce647f9f6a67461974d0c01e4a509597b21c600f42ccdbd57247698dd6
MD5 651936b411b9d9ffc91fddf44e132071
BLAKE2b-256 9de1531b59d8630c46e727d340679630c6c4a55c73f253f079576da66bea134f

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