Skip to content

DinoThor/PyJabber

Repository files navigation

PyJabber

image

image

Documentation Status


PyJabber is a server for Jabber/XMPP entirely written in Python, with minimal reliance on external libraries.
It strives to provide a simple, lightweight, and comprehensible codebase, featuring a modular structure that facilitates extension through the implementation of necessary XEPs for specific use cases.
While initially designed to fulfill the requirements of the multi-agent system SPADE, it can be easily customized to suit any other purpose.

Installation

pip install -i https://test.pypi.org/simple/ pyjabber

Quick start

from pyjabber import Server

my_server = Server()
my_server.start()
class Server(
    host                : str = "localhost",
    client_port         : int = 5222,
    server_port         : int = 5223,
    connection_timeout  : int = 60
)

A formated logger can be added, in order to retrive the messages from the INFO, DEBUG and ERROR levels

2024-05-03 11:45:51.229 | INFO     | pyjabber.server:run_server:52 - Starting server...
2024-05-03 11:45:51.231 | INFO     | pyjabber.server:run_server:73 - Server is listening clients on ('127.0.0.1', 5222)
2024-05-03 11:45:51.231 | INFO     | pyjabber.server:run_server:75 - Server started...

Features

Status Description
TLS Implemented v1.2, with localhost certificate included
SASL Implemented PLAIN
Roster Implemented CRUD avaliable
Presence Not implemented Working on it

Plugins

Status Description
XEP-0077 IMPLEMENTED