Skip to main content

XMPP bridging framework

Project description

Slidge logo

Chat

woodpecker CI status coverage

pypi version debian unstable version

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.

Slidge is available on codeberg (python packages and containers) 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


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.2.7.post1.tar.gz (2.5 MB view details)

Uploaded Source

Built Distribution

slidge-0.2.7.post1-py3-none-any.whl (199.9 kB view details)

Uploaded Python 3

File details

Details for the file slidge-0.2.7.post1.tar.gz.

File metadata

  • Download URL: slidge-0.2.7.post1.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.3

File hashes

Hashes for slidge-0.2.7.post1.tar.gz
Algorithm Hash digest
SHA256 918d592bb0578820c54ab42213720699d24ee8f99474e45e2e5ad785cb086a38
MD5 e18982757ad1c1a7455533346001806c
BLAKE2b-256 672788e9097b1f27167689d7422055492bc23be49855c1d4ad56a66fd7fb600a

See more details on using hashes here.

File details

Details for the file slidge-0.2.7.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for slidge-0.2.7.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 33e1f54d6eb1c78c1605c75847198e80d40571fab5189f7cfec01d93b9ac5fd0
MD5 20d4aad4b386119e8ab85f000c8d725d
BLAKE2b-256 40abff17a2876f9d9ce479b75dc2e2942eb9d0ba30819e80be80922333e51aee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page