1
0
Fork
You've already forked slidge
0
forked from slidge/slidge
An XMPP/other chat networks gateway library in python
  • Python 99.7%
  • Dockerfile 0.1%
2026年01月06日 07:12:23 +01:00
.woodpecker ci(perf): use cached container images when possible 2025年12月13日 15:20:14 +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 fix: escape new lines in participant nicknames 2026年01月06日 07:12:23 +01:00
superduper test(superduper): fix user affiliation in MUCs 2025年05月02日 15:27:22 +02:00
tests fix: escape new lines in participant nicknames 2026年01月06日 07:12:23 +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: update pre-commit hooks 2025年12月20日 15:11:28 +01:00
commitlint.config.js style(commit-msg): add 'imprv' commit message header 2025年02月19日 17:09:04 +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(pyproject): fix typo in comment 2025年12月26日 11:39:26 +01:00
README.md docs(readme): fix MUC badge URL 2025年12月21日 09:11:53 +01:00
uv.lock chore(lockfile): bump 2025年12月20日 15:12:25 +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!