Skip to content

miketheman/unsilencer

Repository files navigation

unsilencer

A tool to interact with MailGun's API to handle suppressions.

Code style: black

Takes an email address as an input, checks to see if the address appears on these lists:

  • unsubscribes
  • complaints
  • bounces

If the address appears, it will then be removed from each list.

Requirements

Installation

git clone https://github.com/miketheman/unsilencer.git
cd unsilencer/
pipenv install
# Alternately, if you want to develop the code:
pipenv install --dev

Configuration

Set environment variables:

  • MAILGUN_API_KEY - see docs. Looks like: key-<hash>
  • MAILGUN_DOMAIN_NAME - the domain owning the suppression lists being checked

Usage

Once installed and configured, execute via pipenv:

pipenv run python unsilencer.py [email protected]

Alternately, enter Pipenv's environment and execute:

pipenv shell
python unsilencer.py [email protected]

Development

Uses pytest test suite, with a bunch of plugins to help with code quality.

Execute tests:

pipenv run pytest

Read a blog from PyBites if you're unfamiliar with pytest!

Testing the tests can be executed via:

pipenv run mutmut run

Read more about mutmut!

Authors

Releases

No releases published

Packages

No packages published

Languages