Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

Sender Rewriting Scheme (SRS) library for Python

Project Description

srslib is a modern Python implementation of the Sender Rewriting Scheme (SRS).


  • Compatible with Python 2.7 and 3.x;
  • Implements the standard “Guarded” SRS scheme as described in the original SRS paper;
  • Simple to use and understand.


pip install srslib

Example Usage

import srslib

srs = srslib.SRS('my_secret_key')

# Rewrites an email from to
rewritten_addr = srs.forward('', '')
# => ''

# Reverse it to get the address to bounce to.
bounce_addr = srs.reverse(rewritten_addr)
# => ''


This library is a clean re-implementation of SRS in modern Python based on the original SRS paper, and taking inspiration from the canonical libsrs2 C implementation and the older pysrs library (which itself is based on the Mail::SRS Perl package).

Compared to these two libraries, srslib

  • … is a clean, modern, pure-Python implementation and supports Python 3.x;
  • … discards baggage from Mail::SRS around legacy schemes and settings.


Licensed under the Apache License, Version 2.0.

Release History

Release History

This version
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
srslib-0.1.tar.gz (5.5 kB) Copy SHA256 Checksum SHA256 Source Jul 28, 2017

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