Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Logging with OTR (Off-the-Record Messaging) and XMPP

Project Description

This is a Python library for logging to XMPP destinations using OTR (Off-the-Record Messaging) encryption.


  • OTRv2
  • Pure python (no libotr dependency)
  • Log to multiple destinations
  • Optionally check log destinations’ OTR fingerprints


$ sudo pip install --pre xmpppy  # xmpppy is tagged as an "rc" version
$ sudo pip install otrxmpplogger


from otrxmpplogger import OTRXMPPLogger
import logging
import time
log = logging.getLogger()
privkey = open('.otrprivkey', 'r').read()
handler = OTRXMPPLogger(

log.debug('setting up OTR')  # Trigger OTR setup
time.sleep(3)  # Give OTR a little while to go active
log.critical('@6 is a rat!')


  • XMPP invitations are not handled
  • It seems to take roughly 3 seconds to set up an OTR session. Messages logged before the session is ready may be lost.



If you found this software useful and would like to encourage its maintenance and further development, please consider making a donation to the Bitcoin address 13RrGMM1YUduzSrw5BhE7BXFGPtBDQYnpQ.


This is free and unencumbered public domain software. For more information, see or the accompanying UNLICENSE file.

Release History

Release History

This version
History Node


History Node


History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
OTRXMPPLogger-1.0.3.tar.gz (2.9 kB) Copy SHA256 Checksum SHA256 Source Mar 25, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting