Skip to main content

A lightweight, modular and asyncio XMPP/Jabber server written in Python.

Project description

https://img.shields.io/pypi/v/pyjabber.svg Python 3.8 to 3.12 Build Status Coverage Status Code lines counter Documentation Status Monthly downloads Total downloads

PyJabber is an asyncio 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.
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

Python program

The process of starting the server returns a coroutine, leaving it to the user to set up the required environment. The simplest approach is to use the asyncio.run function.

from pyjabber.server import Server

my_server = Server()
asyncio.run(my_server.start())

This allows PyJabber to be treated as a regular task and integrated seamlessly into an asynchronous application.

import asyncio
from pyjabber.server import Server

async def counter():
  while True:
    await asyncio.sleep(1)
    print(f"Hello World")

async def launch():
  my_server = Server()
  await asyncio.gather(my_server.start(), counter())

asyncio.run(launch())

CLI

The CLI launcher is the fastest way to start using the server.

$ pyjabber
2024-12-18 09:03:22.880 - INFO: Starting server...
2024-12-18 09:03:22.881 - INFO: Client domain => localhost
2024-12-18 09:03:22.881 - INFO: Server is listening clients on [('127.0.0.1', 5222), ('158.42.155.44', 5222)]
2024-12-18 09:03:22.881 - INFO: Serving admin webpage on http://localhost:9090
2024-12-18 09:03:22.881 - INFO: Server is listening servers on [('0.0.0.0', 5269)]
2024-12-18 09:03:22.881 - INFO: Server started...

Features

Status

Description

TLS

Implemented

v1.3. Localhost certificate included

SASL

Implemented

PLAIN, EXTERNAL (s2s)

Roster

Implemented

CRUD avaliable

Presence

Implemented (local bound)

Subscribe, Unsubscribed, Initial presence and Unavailable

Plugins

Status

Description

XEP-0004

IMPLEMENTED

Dataforms

XEP-0030

IMPLEMENTED

Service Discovery

XEP-0060

IMPLEMENTED

Pubsub

XEP-0077

IMPLEMENTED

In Band Registration

XEP-0199

IMPLEMENTED

Ping

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.4.5.tar.gz (958.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyjabber-0.4.5-py3-none-any.whl (986.5 kB view details)

Uploaded Python 3

File details

Details for the file pyjabber-0.4.5.tar.gz.

File metadata

  • Download URL: pyjabber-0.4.5.tar.gz
  • Upload date:
  • Size: 958.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pyjabber-0.4.5.tar.gz
Algorithm Hash digest
SHA256 724afcf849c3758cb6c2b63c5bb6f59b66bc0102a7fcf1ff9c06f7d374e13d43
MD5 4b33aaa912388f65f8bdcd4079b5905e
BLAKE2b-256 c6c769bab27f31e7afbfdd5c33e36f05bc6beb9771002005ca0c12954a254c59

See more details on using hashes here.

File details

Details for the file pyjabber-0.4.5-py3-none-any.whl.

File metadata

  • Download URL: pyjabber-0.4.5-py3-none-any.whl
  • Upload date:
  • Size: 986.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pyjabber-0.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 73601938d1b34473b399855c7b2e6dcd9417ff756e2fc42deadb990804b8274f
MD5 eb589926421bed10b252c1aee18be7cd
BLAKE2b-256 9cf409c6c8795d04dd727d252aa7b495d1df1e0b860c8fbff79d0fc2b453fbc9

See more details on using hashes here.

Supported by

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