Skip to main content

Slixmpp

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:

Metadata

Release files for slixmpp 1.18.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for slixmpp 1.18.0
File Size Uploaded Provenance Actions
slixmpp-1.18.0.tar.gz 804.0 kB Without provenance Details for slixmpp-1.18.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for slixmpp 1.18.0
File Actions
slixmpp-1.18.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.15 CPython 3.15 Linux glibc 2.17+ x86-64 Details for slixmpp-1.18.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
slixmpp-1.18.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.15 CPython 3.15 Linux glibc 2.17+ ARM64 Details for slixmpp-1.18.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
slixmpp-1.18.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ x86-64 Details for slixmpp-1.18.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
slixmpp-1.18.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ ARM64 Details for slixmpp-1.18.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
slixmpp-1.18.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details for slixmpp-1.18.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
slixmpp-1.18.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ ARM64 Details for slixmpp-1.18.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Total release size: 6.9 MB

Release files / slixmpp-1.18.0.tar.gz

Download URL slixmpp-1.18.0.tar.gz
Size 804.0 kB
Tags Source
SHA-256 checksum
How to use checksums
070ba4976c1aba2aeb79fa58b3b5bf12bc114dc002c2cfbc0204baa62cccfdf1
BLAKE2b-256 checksum
How to use checksums
dc0545328ba05b9c055cf2430339da7274820a93691ad4e543c6842069a78422
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / slixmpp-1.18.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL slixmpp-1.18.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.0 MB
Tags CPython 3.15 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
57ad6e3a1d6ffaac1fe3e280318870af00213fd8ee7f9de2375df9def3a74b26
BLAKE2b-256 checksum
How to use checksums
56a7226b20b84125d28c2bde89e01c732a253fcda064794fe7554777bca68787
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / slixmpp-1.18.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL slixmpp-1.18.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 1.0 MB
Tags CPython 3.15 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
05c76b56722a49df922c4aac3085a54166316e280bc986f3895664d7dce38cd1
BLAKE2b-256 checksum
How to use checksums
2a736895f4a5638f23fa4282f339939d8c76336fe76f9436565ef15e1450e9c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / slixmpp-1.18.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL slixmpp-1.18.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.0 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
1e366f142f2c03617a3e73a54fde59a76e88eefd3ba67eee4e6f6c0d5d5346d0
BLAKE2b-256 checksum
How to use checksums
0b269c201b77a29cbfdc2cae9ac432ec077b52611e4cac0e8722f5795ec55b71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / slixmpp-1.18.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL slixmpp-1.18.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 1.0 MB
Tags CPython 3.14 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
790d62dea3ec123b8c0543a727387185a9d1195ab9b24a9782b6820aa0ea6e2c
BLAKE2b-256 checksum
How to use checksums
31904b55c98a175f240f306ad5e04b0d35a082de351cf0bdc82b226fbb0092d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / slixmpp-1.18.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL slixmpp-1.18.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.0 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
a4f1ae174c49a24dd306fc5eadd17220da7c47f60bb26feb991bb9d8322d44f9
BLAKE2b-256 checksum
How to use checksums
dd0876a1806687084680e475a8f145e71c6490de83b195f73530ab4711ad7e06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / slixmpp-1.18.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL slixmpp-1.18.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 1.0 MB
Tags CPython 3.13 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
87512a120abc323b93052e9e48031f2599da2368998cff7eaf1f95592f2e4090
BLAKE2b-256 checksum
How to use checksums
f710f8dd9cc10538ff6131114e4b30b28ed680097ff7abd08e43fbb66986d5e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for slixmpp 1.18.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.18.0 This release

7 release files No provenance

1.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page