An XMPP/other chat networks gateway library in python https://slidge.im/
  • Python 99.7%
  • Dockerfile 0.1%
Find a file
nicoco 581d3831f7
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test/4 Pipeline was successful
ci/woodpecker/pr/test/3 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test-postgres Pipeline was successful
ci/woodpecker/push/container-ci/2 Pipeline was successful
ci/woodpecker/push/container-ci/1 Pipeline was successful
ci/woodpecker/push/container-ci/4 Pipeline was successful
ci/woodpecker/push/container-ci/3 Pipeline was successful
ci/woodpecker/push/package Pipeline was successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/test-postgres Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/test/4 Pipeline was successful
ci/woodpecker/push/test/3 Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
imprv: mark override-mandatory methods as abstractmethods
2026-02-18 08:34:51 +01:00
.woodpecker test: run against postgresql 2026-02-10 06:29:22 +01:00
dev imprv(config)!: always treat correction to empty body as retraction 2025-04-28 10:32:32 +02:00
docs docs: remove admin and user docs 2025-11-21 13:34:06 +01:00
slidge imprv: mark override-mandatory methods as abstractmethods 2026-02-18 08:34:51 +01:00
superduper chore: update deprecated syntax 2026-02-09 22:23:30 +01:00
tests refactor: stop using metaclass 2026-02-18 08:34:51 +01:00
.gitignore build: use setuptools-scm instead of custom worse implementation 2025-04-03 21:17:46 +02:00
.pre-commit-config.yaml chore(pre-commit): bump hooks 2026-02-18 08:34:51 +01:00
commitlint.config.js style(commit-msg): add 'imprv' commit message header 2025-02-19 17:09:04 +01:00
CONTRIBUTING.md docs: add CONTRIBUTING.md 2026-02-15 09:59:15 +01:00
doap.xml chore(doap): update chat rooms JIDs 2025-11-21 12:46:20 +01:00
docker-compose.yml refactor: simplify dockerfile 2025-04-06 15:02:04 +02:00
Dockerfile refactor: simplify dockerfile 2025-04-06 15:02:04 +02:00
LICENSE Move to sourcehut 2022-07-14 00:51:36 +02:00
pyproject.toml chore(ruff): improve lint rule selection syntax 2026-02-18 08:34:51 +01:00
README.md docs(readme): fix MUC badge URL 2025-12-21 09:11:53 +01:00
uv.lock chore(pyproject): remove bogus extra in dependencies 2026-02-15 09:48:10 +01:00

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

Thank you, Trung, for the slidge logo!