semvec/pypi-packages huggingface dataset:
coitrees 0.0.1
Add a short description here!
License: MIT

<!-- These are examples of badges you might want to add to your README:
     please update the URLs accordingly

[![Built Status](https://api.cirrus-ci.com/github/<USER>/coitrees.svg?branch=main)](https://cirrus-ci.com/github/<USER>/coitrees)
[![ReadTheDocs](https://readthedocs.org/projects/coitrees/badge/?version=latest)](https://coitrees.readthedocs.io/en/stable/)
[![Coveralls](https://img.shields.io/coveralls/github/<USER>/coitrees/main.svg)](https://coveralls.io/r/<USER>/coitrees)
[![PyPI-Server](https://img.shields.io/pypi/v/coitrees.svg)](https://pypi.org/project/coitrees/)
[![Conda-Forge](https://img.shields.io/conda/vn/conda-forge/coitrees.svg)](https://anaconda.org/conda-forge/coitrees)
[![Monthly Downloads](https://pepy.tech/badge/coitrees/month)](https://pepy.tech/project/coitrees)
[![Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Twitter)](https://twitter.com/coitrees)
-->

[![Project generated with PyScaffold](https://img.shields.io/badge/-PyScaffold-005CA0?logo=pyscaffold)](https://pyscaffold.org/)

# coitrees

> Add a short description here!

A longer description of your project goes here...


<!-- pyscaffold-notes -->

## Note

This project has been set up using PyScaffold 4.5. For details and usage
information on PyScaffold see https://pyscaffold.org/.
diqu-email 1.0.0
Data Quality CLI for the Auto-Alerts - Emails
License: MIT
Requires Python: <3.13,>=3.9
Keywords: packaging, poetry, data-quality, alert, notification, collaboration, agility, flake8, markdown, lint

# diqu-email

Alert module using Email method (Sendgrid)

## How to use

### Installation

```bash
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](/example/image.png)
- 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:

```bash
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](./example/) as following command:

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

Here is the sample result:

![Alt text](/example/email.png)