Skip to main content

XMPP bridging framework

Project description

Slidge logo

woodpecker CI status coverage Chat

Slidge is an XMPP (puppeteer) gateway library in python. It makes writing gateways to other chat networks (legacy modules) as frictionless as possible. It supports fancy IM features, such as (emoji) reactions, replies, and retractions. The full list of supported XEPs in on xmpp.org.

Status

Slidge is beta-grade software. It support groups and 1:1 chats. Try slidge and give us some feedback, through the MUC or the issue tracker. Don't be shy!

Usage

A minimal (and fictional!) slidge-powered "legacy module" looks like this:

from cool_chat_lib import CoolClient
from slidge import BaseGateway, BaseSession
from slidge.contact import LegacyContact
from slidge.group import LegacyMUC
from slidge.db import GatewayUser


class Gateway(BaseGateway):
    # Various aspects of the gateway component are configured as class
    # attributes of the concrete Gateway class
    COMPONENT_NAME = "Gateway to the super duper chat network"


class Session(BaseSession):
    def __init__(self, user: GatewayUser):
        super().__init__(user)
        self.legacy_client = CoolClient(
            login=user.legacy_module_data["username"],
            password=user.legacy_module_data["password"],
        )

    async def on_text(self, chat: LegacyContact | LegacyMUC, text: str, **kwargs):
        """
        Triggered when the slidge user sends an XMPP message through the gateway
        """
        self.legacy_client.send_message(text=text, destination=chat.legacy_id)

There's more in the tutorial!

Installation

⚠️ Slidge is a lib for gateway developers, if you are an XMPP server admin and want to install gateways on your server, you are looking for a slidge-based gateway. or the slidge-debian bundle.

pypi version

Packaging status

Slidge is available on codeberg and pypi. Refer to the docs for details.

About privacy

Slidge (and most if not all XMPP gateway that I know of) will break end-to-end encryption, or more precisely one of the 'ends' become the gateway itself. If privacy is a major concern for you, my advice would be to:

  • use XMPP + OMEMO
  • self-host your gateways
  • have your gateways hosted by someone you know AFK and trust

Related projects

Thank you, Trung, for the slidge logo!

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slidge-0.3.11.tar.gz (547.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slidge-0.3.11-py3-none-any.whl (201.7 kB view details)

Uploaded Python 3

File details

Details for the file slidge-0.3.11.tar.gz.

File metadata

  • Download URL: slidge-0.3.11.tar.gz
  • Upload date:
  • Size: 547.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for slidge-0.3.11.tar.gz
Algorithm Hash digest
SHA256 82eac13e46f0e2a0f0662bfc0703c225800e1efa63de7b502944c34b8483b906
MD5 dc0fcce637328b0e14ce83318390d99f
BLAKE2b-256 ed083ca05d1ad9f58eca2752d220c8298cffb5717fac8c399c28f6ca83f7dcc6

See more details on using hashes here.

File details

Details for the file slidge-0.3.11-py3-none-any.whl.

File metadata

  • Download URL: slidge-0.3.11-py3-none-any.whl
  • Upload date:
  • Size: 201.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for slidge-0.3.11-py3-none-any.whl
Algorithm Hash digest
SHA256 c6f22a9d3f848781cc314632515ee6b3ac14c1939dbdf7103eec705dfc0641f0
MD5 3e675e86481b052f09cab9112d79236e
BLAKE2b-256 c1564fd86a6f742fd74faa5e283854d09b4e58ab8ebf4dddb02a02a1f69b9372

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