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.11.0.tar.gz (710.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.11.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.11.0-cp313-cp313-musllinux_1_2_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ ARM64

slixmpp-1.11.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (931.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

slixmpp-1.11.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (917.8 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

slixmpp-1.11.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.11.0-cp312-cp312-musllinux_1_2_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ ARM64

slixmpp-1.11.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (932.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

slixmpp-1.11.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (918.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

slixmpp-1.11.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.11.0-cp311-cp311-musllinux_1_2_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ ARM64

slixmpp-1.11.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (932.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

slixmpp-1.11.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (918.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

slixmpp-1.11.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.11.0-cp310-cp310-musllinux_1_2_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ ARM64

slixmpp-1.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (932.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

slixmpp-1.11.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (918.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

slixmpp-1.11.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.11.0-cp39-cp39-musllinux_1_2_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.9musllinux: musl 1.2+ ARM64

slixmpp-1.11.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (932.8 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

slixmpp-1.11.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (918.5 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

File details

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

File metadata

  • Download URL: slixmpp-1.11.0.tar.gz
  • Upload date:
  • Size: 710.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.2

File hashes

Hashes for slixmpp-1.11.0.tar.gz
Algorithm Hash digest
SHA256 850c5f3b1964a507425a5192768b5963a787909afa337c64911bf86d1d2eacf3
MD5 f2093b087f87c4a021e2f85f1f400eb7
BLAKE2b-256 dce37aea6817cc0aff7fd2c930b2a6ca380982638f346a8b7487a156034497aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.11.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 dbf7db650ab357636fda2da6106fd11d4c61b62ff3c5b9dcc1eba07d22ba092b
MD5 64588cbcfe52cb2a4f692b07e68d84fe
BLAKE2b-256 39933466d3d283812f1ae8c057c6237483c5d6cac7297f4e827a1455ea66122c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.11.0-cp313-cp313-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 45bc639c1572745c7d870f33fe29d43edb0b85a631ee2f2f8545023772c5e42f
MD5 8ad2e43d389161113aacd56475f4c999
BLAKE2b-256 9c31f8f434cbf716c65a276e49ac029a6a9cca770286f1e48746edab8b145ee4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.11.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ab0931334a7b8c3c61ebc949a990e910bc4136c96050ef3493e6a53843d6dbc9
MD5 86d6d1ea74d263ffa6b877a8bbe0f0e5
BLAKE2b-256 276ce0d9fdb4f9636f87d2266b91c107881c27e9cfe219c8c8d98a5b30740056

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.11.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 bac94858278124ac0c7d84cc9065169a52e6a6e6af20f1437e73ef8da474f99f
MD5 d4b5ff52eda4ff044931f069e05cee11
BLAKE2b-256 b7065083b69d9d84c9ad2adc208a351a67839c42de63508fc18c74fe9e80a11c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.11.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0c51c765080389134be05ddd3006b846f506f61a40597bf8f93487182bc6fc6e
MD5 34ee4b3151f4b472a0e58b25dbd515c4
BLAKE2b-256 9763fe6a3b817be8fc84f26dc295cf085f387cde727f6eb806e2e5ca752ca39c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.11.0-cp312-cp312-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 037aad408936c3aabbe3ced894c22370726e29e53fb316074e713f9f6adc5245
MD5 561bdd5a622caa66039df28468344aad
BLAKE2b-256 31764742dd4565a4a69c2f8582aadc481e7275b64f0b76bcac50a7e06e655b4e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.11.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ea7229d9655c2f42c5d7a32685b26d7c29015ba548e6507a20a5d95e33cddfba
MD5 a577a79cf86d63257cca5e161e859737
BLAKE2b-256 8d6ed3f9578e58a7df898217fe52afa9220336f01a4be82557a6ff8e906568cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.11.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b7436adc40a2fd4ecd2d1b5171d3e38511b6ebdd0a75013e1da39b2970a4d5b5
MD5 f2f86105a7ae491d17917f2e3ca1cbc5
BLAKE2b-256 a486d92182a6e158f08489b8126abdd61866fcad211fb05b186b1c57afb6ac5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.11.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 33ca43b19a669742d57d21b75da11cc3be84fb94ffa3956d388eda7fcd156320
MD5 517250d289ea4bd08efc4babdc6dafe9
BLAKE2b-256 bbc7d39c20cefa2a840d894d422cb16622887949ed0b25920619a7b49a9cbc06

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.11.0-cp311-cp311-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 cd4e3643754a349cb692f95e722a1fdf42e34668100a1578a5993f816f588afd
MD5 d4ad5c41dfc529ce6180ec36a33c027c
BLAKE2b-256 bbab620bc1604c5b54073b3bfff0e2ea1cc4396f6fe95810db9537ef1c6662d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.11.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b57c625efb3557498426fcf98cec106ebd790a0e4953ea2911fef974011d7475
MD5 41ebccae4320e14c7fb723348cc53e31
BLAKE2b-256 5749c34a4307cbbfec0aa1029d453661e69278b407b5fd13fab482e34fe96771

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.11.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 364d402ac28117255efa8f7ff75e513d21e282bdd6c1330d31db4a045cf71866
MD5 1be558e69105d2ba824fa5c0a6b07c90
BLAKE2b-256 d42c4d39cd5d138340dc5e9540020549ef2210ada792fa818d6d80fcf622428d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.11.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 1f4bd636c558f35b5fd0036c5ca598f7767b9aeb5f9f0a0665df3c78beba5e58
MD5 b9b344edac3cead7007a6950af6f1204
BLAKE2b-256 48b6ddf3e526bbcc0982fe0b4bfdf8882ff28a3a6db68df457044131ff6e6af2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.11.0-cp310-cp310-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 83e03989acf6f677cdb8b3db94a91c33219b913a76fd8c2355168d9e59a020d1
MD5 6b706da7a6c1ed4d92ac269cc2591a5f
BLAKE2b-256 7c0bf8d95e2f566c491ff433a321f24e6e1fbadd70ddeb891ab235e4f1cbc1a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6d9829a53a204cec004212f1dd0d485e2078290fd2926e23b99563178bfa3962
MD5 df4fbd09ac2a4f134ea65e7672b8b4d5
BLAKE2b-256 036ebb3134c343410a4024b846e98d73ac331f810a7feec034fc4111692e55a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.11.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f336d39cd792bcc76a7ec88d04787695a5b9c16ac6dc21fd83ae743b3fc93c03
MD5 cb99cce4f11b235aa914a2de1c08cc6a
BLAKE2b-256 ffdc68a8934109d9bf02b79af98f593fde1430cdec4627535b9b9dae19860f60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.11.0-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 161ab05e6787058a33d57e36a5bb2242f367c7651191860faad1230f97d7962b
MD5 a881ea10e02d20ea2f80df6949eddf66
BLAKE2b-256 eb7cb2268b6c9769728257d7ec8fed10c0c684876a5f4f6d9dcf7ba7862f771b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.11.0-cp39-cp39-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 32ba0b357eabfb9abd573bdc90334754a442e94a4c511c1c5d94ccd07c5ab1c4
MD5 dc215782659a1ad6f1e565b549c1f46f
BLAKE2b-256 ef88dc7037c3985c828246eb1ead7733cd67d826c4f369f992794d9f81e38d2a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.11.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 71149e68f7bd7da72c1100995b982843c537a210f7c2336ef94eab709acbd721
MD5 3608e3054d86a6c25b5624186e233940
BLAKE2b-256 729ac75b40e7ab1479de48c5bff12116f0f65ec527d80feca4de1b8372c97635

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slixmpp-1.11.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4a784dfb7ac5b2200f099c12dcd4785b59eaffb2dbee7ba6c94471fa2c3d05b1
MD5 db9e21b73cbb1a8b279e073b7d858e3b
BLAKE2b-256 9d402547466cfeb08f093fc98b139c0cad826eb7817d1a3d9f5ddd4690a2f5df

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