Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

common email templates and functions

Project description

https://travis-ci.org/UrbanCCD-UChicago/plenario-mailer-core.svg?branch=master https://coveralls.io/repos/github/UrbanCCD-UChicago/plenario-mailer-core/badge.svg?branch=master

Usage

This package has a handful of useful shortcuts to send informational emails to data set contributors and admins. The functions can be wired up to be used with the data set event signals provided in plenario-core. For example:

from plenario_core.signals import data_set_approved
from plenario_core_mailer import mailer

def notify_approval(meta_model: MetaBase) -> None:
    mailer.send_data_set_approved(meta_model)

data_set_approved.connect(notify_approval)

Now, when a data set is marked as approved, plenario-core will fire off the signal and the defined handler will pick it up and call the mailer function.

Development

Fire up a virtualenv and install the dev requirements:

$ python3.6 -m venv .env
$ source .env/bin/activate
$ pip install -r dev-requirements.txt

To run the tests, in a separate terminal pull in the PostGIS docker image and create the database:

$ docker pull mdillon/postgis
$ docker run -d -p 5432:5432 mdillon/postgis
$ docker ps
...
$ docker exec -it {container hash} /bin/bash
...
# su postgres -c psql
...
> create database plenario;

Then all you have to do is run the tests normally:

$ coverage run manage.py test
$ coverage report
$ flake8

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
plenario_mailer_core-0.0.2-py3-none-any.whl (10.5 kB) Copy SHA256 hash SHA256 Wheel py3 Sep 27, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page