SendGrid

https://img.shields.io/pypi/v/kpireport-sendgrid
pip install kpireport-sendgrid

Send the report as an email using SendGrid. This plugin utilizes SendGrid’s API, and you must generate an API key that has the “Mail Send” permission to authenticate and send the report.

Images or other attachments are by default embedded within the email, but you can optionally link them in as remote assets instead. Remote linking requires that the report additionally be placed somewhere accessible over the Internet, via, e.g., the Static file, S3, or SCP (secure copy) plugins.

Note

This plugin utilizes premailer for CSS inlining, which in turn utilizes cssutils, which is licensed under LGPL 3.0. A copy of this license is included in LGPL-3.0.md in the plugin source.

API

class kpireport_sendgrid.SendGridOutputDriver(report: kpireport.report.Report, **kwargs)

Bases: kpireport.output.OutputDriver

Email a report via SendGrid.

Note

When testing, you can set a SENDGRID_SANDBOX_ENABLED=1 environment variable, which will only verify the mail payload on SendGrid, but will not actually send it.

email_from

the sender email address.

Type

str

email_to

a list of target email addresses.

Type

List[str]

api_key

a SendGrid API key authorized to send mail on behalf of the sending address.

Type

str

Changelog

0.0.1

Prelude

Initial commit.

New Features

  • Initial commit.