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.
-
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:
Metadata
Release files for diqu-email 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| diqu_email-1.0.0.tar.gz | 3.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| diqu_email-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.9 kB
Release files / diqu_email-1.0.0.tar.gz
| Download URL | diqu_email-1.0.0.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9c43c3fcbdfd39780182a4b646bbdd8f5a77cb4502d7c1ba90857c0c9ee1e98
|
|
BLAKE2b-256 checksum How to use checksums |
eb916524eaefcffb84d3bab38391bcb08ec1d5721f63ebffa27849e6a4e3e33f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.4 Linux/6.5.0-1022-azure
|
Release files / diqu_email-1.0.0-py3-none-any.whl
| Download URL | diqu_email-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
65936d5d5181c43711b0c0ae90a5b210cc4f91994b8fe26ae6cf764526d434da
|
|
BLAKE2b-256 checksum How to use checksums |
f541e8055d789792e7ec42ca384b8da11b437a53401f0c2640f3eca3e00e75c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.4 Linux/6.5.0-1022-azure
|
Security for diqu-email 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.