Skip to main content

A Python XMPP server

Project description

https://img.shields.io/pypi/v/pyjabber.svg https://img.shields.io/github/actions/workflow/status/dinothor/pyjabber/python-app.yml 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 pyjabber

Quick start

from pyjabber import Server

my_server = Server()
my_server.start()

or

python -m pyjabber --help
Usage: python -m pyjabber [OPTIONS]

Options:
  --host TEXT               Host name  [default: localhost]
  --client_port INTEGER     Server-to-client port  [default: 5222]
  --server_port INTEGER     Server-to-server port  [default: 5269]
  --family [ipv4|ipv6]      (ipv4 / ipv6)  [default: ipv4]
  --timeout INTEGER         Timeout for connection  [default: 60]
  --log_level [INFO|DEBUG]  Log level alert  [default: INFO]
  --log_path TEXT           Path to log dumpfile.
  -D, --debug               Enables debug mode in Asyncio.
  --help                    Show this message and exit.

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

Partialy implemented

subscribe, unsubscribed, initial presence and unavailable

Plugins

Status

Description

XEP-0077

IMPLEMENTED

XEP-0199

IMPLEMENTED

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyjabber-0.1.1.tar.gz (1.2 MB view hashes)

Uploaded Source

Built Distribution

pyjabber-0.1.1-py3-none-any.whl (1.0 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page