Skip to main content

Data Quality CLI for the Auto-Alerts - Emails

Project description

diqu-email

Alert module using Email method (Sendgrid)

How to use

Installation

pip install diqu diqu-email

Send email

Before you can send email with Sendgrid, go create your template first:

  • Go to Email API / Dynamic Templates: Create a Dyanmic Template

  • Design your template e.g.

    sample template

  • Save it and get the Template ID e.g. d-c70732f1cb304d39823d52cd5cee8312

  • Go to Settings / API Keys: Get an API key e.g. SG.xxx.xxx

Now, you're ready to send alert:

export SENDGRID_API_KEY=YOURVALUE e.g. SG.xxx.xxx
export SENDGRID_MAILING_LIST=YOURVALUE e.g. dat@domain.com,dat2@domain.com
export SENDGRID_TEMPLATE_ID=YOURVALUE e.g. d-c70732f1cb304d39823d52cd5cee8312

# powershell
$env:SENDGRID_API_KEY="YOURVALUE"
$env:SENDGRID_MAILING_LIST="dat@domain.com,dat2@domain.com"
$env:SENDGRID_TEMPLATE_ID="d-c70732f1cb304d39823d52cd5cee8312"

diqu alert --to sendgrid

For a quick testing purpose, we can use the CSV package to run the example as following command:

diqu alert --to sendgrid --package csv --profile-name example --profiles-dir ./example

Here is the sample result:

Alt text

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

diqu_email-1.0.0.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

diqu_email-1.0.0-py3-none-any.whl (4.4 kB view hashes)

Uploaded Python 3

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