XMPP bridging framework
Project description
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 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
Built Distribution
File details
Details for the file slidge-0.2.12.tar.gz
.
File metadata
- Download URL: slidge-0.2.12.tar.gz
- Upload date:
- Size: 2.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64a1fbd38fa5b79a11931a6d0e338bcc447e395ce2275b20c26312bcb54372d1 |
|
MD5 | c84aa86e3ddaacca9a5eb67361770e7f |
|
BLAKE2b-256 | 006a909be0619585c1d9120514ff37b49fd9467ea4fcd0b071a9f3160562b304 |
File details
Details for the file slidge-0.2.12-py3-none-any.whl
.
File metadata
- Download URL: slidge-0.2.12-py3-none-any.whl
- Upload date:
- Size: 198.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39f4def6f3ea2d7f7a3b334d18cbbbec7b44b85048d8643236edfb2f5c138cff |
|
MD5 | 7bc1e0013845768f9cd33b3e9d0410b0 |
|
BLAKE2b-256 | 045b082ceaf35082b5ccbf18165da0d460a00c646354841941b9a69658dc9802 |