Skip to main content

XMPP implementation in Python

Project description

Python 2/3 implementation of XMPP (RFC3920, RFC3921).


Documentation: http://xmpppy.sf.net/

Source Code: https://github.com/xmpppy/xmpppy

Status:

https://img.shields.io/pypi/pyversions/xmpppy.svg https://img.shields.io/pypi/v/xmpppy.svg https://img.shields.io/pypi/l/xmpppy.svg https://img.shields.io/pypi/dm/xmpppy.svg

About

This library has been written to be compliant with RFC3920 and RFC3921.

Installation

Using pip, you can install the package with:

pip install xmpppy --upgrade

Usage

As a library

Regularly, the module is used as a library, like:

jabberid = "foobar@xmpp.domain.tld"
password = "secret"
receiver = "bazqux@xmpp.domain.tld"
message  = "hello world"

jid = xmpp.protocol.JID(jabberid)
connection = xmpp.Client(server=jid.getDomain(), debug=debug)
connection.connect()
connection.auth(user=jid.getNode(), password=password, resource=jid.getResource())
connection.send(xmpp.protocol.Message(to=receiver, body=message))

Command line interface

The package also installs a command line program called xmpp-message. Its synopsis is:

xmpp-message --debug \
    --jabberid foobar@xmpp.domain.tld --password secret \
    --receiver bazqux@xmpp.domain.tld --message 'hello world'

You can also put your credentials into an ~/.xsend file, like:

JID=foobar@xmpp.domain.tld
PASSWORD=secret

and then invoke xmpp-message omitting the --jabberid and --password options, like:

xmpp-message --receiver bazqux@xmpp.domain.tld --message 'hello world'

Documentation

The canonical documentation is hosted at https://xmpppy.github.io/ and http://xmpppy.sourceforge.net/.

For learning about how to use this module, please have a look at these spots within the code base.

  • The xmpp-message program, located at xmpp/cli.py, for sending a single XMPP message.

  • The other programs within the doc/examples directory.

  • The docstrings within the library itself.

Support

If you have any questions about xmpppy usage or you have found a bug or want to share some ideas - you are welcome to join us on the issue tracker or on the xmpppy-devel mailing list.

Other projects

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

xmpppy-0.7.1.tar.gz (87.3 kB view details)

Uploaded Source

File details

Details for the file xmpppy-0.7.1.tar.gz.

File metadata

  • Download URL: xmpppy-0.7.1.tar.gz
  • Upload date:
  • Size: 87.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/60.10.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.12

File hashes

Hashes for xmpppy-0.7.1.tar.gz
Algorithm Hash digest
SHA256 c5ff61c0fa0ad8b9e521939f944bbcdac0a2375e7ec24201605cc540857e0400
MD5 fc1a59f89130af72bd3d698860644aa7
BLAKE2b-256 b9dcc82cf11d776b371863bef8de412e949467e291977d2aaded91d010713a6f

See more details on using hashes here.

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