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
from slidge.util.types import XMPPMessage
class Session(BaseSession):
async def login(self, user: GatewayUser) -> None:
self.legacy_client = CoolClient(
login=user.legacy_module_data["username"],
password=user.legacy_module_data["password"],
)
await self.legacy_client.login()
class Gateway(BaseGateway[Session]):
# 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 Contact(LegacyContact):
async def on_message(self, msg: XMPPMessage) -> str:
"""
Triggered when the slidge user sends an XMPP message through the gateway
"""
sent = self.session.legacy_client.send_message(
text=text, destination=self.legacy_id
)
return str(sent.message_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 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!
Metadata
Release files for slidge 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| slidge-0.5.1.tar.gz | 537.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| slidge-0.5.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 764.3 kB
Release files / slidge-0.5.1.tar.gz
| Download URL | slidge-0.5.1.tar.gz |
|---|---|
| Size | 537.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e0a54bf8750d2c53b3c72e634515320a960b9edf261150234ab0ebdb217321f
|
|
BLAKE2b-256 checksum How to use checksums |
36019c5d9ca0a115501316d34c0f5a85ee35023eb09ba9f4781c017c99a39756
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / slidge-0.5.1-py3-none-any.whl
| Download URL | slidge-0.5.1-py3-none-any.whl |
|---|---|
| Size | 226.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9e3f95ed19e236e2f3c3118eb2e1b232b248e55a425e77b54d13834d642efb6c
|
|
BLAKE2b-256 checksum How to use checksums |
40cc4ce9194b2553560e26bef8ac2989912da8f7a88132d9def87036af988af3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|