Skip to main content

PyPI version Travis Build Coverage Status

Flask plugin for sending emails with SendGrid.

Provides full support for all Twilio SendGrid Web API v3 endpoints, including v3 /mail/send.

Installation

pip install flask-sendgrid

Usage

from flask_sendgrid import SendGrid
app = Flask(__name__)
app.config['SENDGRID_API_KEY'] = 'your api key'
app.config['SENDGRID_DEFAULT_FROM'] = 'admin@yourdomain.com'
mail = SendGrid(app)

# send multiple recipients; backwards compatible with Flask-Mandrill
mail.send_email(
    from_email='someone@yourdomain.com',
    to_email=[{'email': 'test1@example.com'}, {'email': 'test2@example.com'}],
    subject='Subject'
    text='Body',
)

# send single recipient; single email as string
mail.send_email(
    from_email='someone@yourdomain.com',
    to_email='test@example.com',
    subject='Subject'
    text='Body',
)

# send single recipient; single email as sendgrid.mail.helpers.Email object
mail.send_email(
    from_email='someone@yourdomain.com',
    to_email=Email('test@example.com'),
    subject='Subject'
    text='Body',
)

# send multiple recipients; list of emails as sendgrid.mail.helpers.Email object
mail.send_email(
    from_email='someone@yourdomain.com',
    to_email=[Email('test1@example.com'), Email('test2@example.com')],
    subject='Subject'
    text='Body',
)

For additional information about mail parameters: SendGrid Web API Mail

Release History

0.5.12 (2016-1-3)

  • another maintenance release

0.5.1 (2016-1-3)

  • maintenance release

0.5.0 (2016-1-2)

  • Upgrading to support SendGrid API v3

0.1.0 (2016-03-30)

  • First release.

Metadata

Release files for Flask-SendGrid 0.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Flask-SendGrid 0.7.1
File Size Uploaded
Flask-SendGrid-0.7.1.tar.gz 4.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for Flask-SendGrid 0.7.1
File Interpreter ABI Platform
Flask_SendGrid-0.7.1-py3-none-any.whl Python 3 none any Details
Flask_SendGrid-0.7.1-py2-none-any.whl Python 2 none any Details

Total release size: 12.3 kB

Release files / Flask-SendGrid-0.7.1.tar.gz

Download URL Flask-SendGrid-0.7.1.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
be081d350fca7433655aa8e6b789000a0f673b7bfda8cb72eea20bb55e09051f
BLAKE2b-256 checksum
How to use checksums
07bae8005aec6e1ad74f8b920aa9ce99912ed81c89c72a4b6b35f5ba98989079
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.4.6

Release files / Flask_SendGrid-0.7.1-py3-none-any.whl

Download URL Flask_SendGrid-0.7.1-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f81ecad0cbbdd28d8750e1db43bb683ea18a16b4f96af82fdb2857d9a402020
BLAKE2b-256 checksum
How to use checksums
c8b96cade7727a53dc7cc2da6a6197705de980715af12e480495f9865c7bc07c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.4.6

Release files / Flask_SendGrid-0.7.1-py2-none-any.whl

Download URL Flask_SendGrid-0.7.1-py2-none-any.whl
Size 4.1 kB
Tags Python 2
SHA-256 checksum
How to use checksums
d6892fa41cc038cbab41bab12e9cce3cddbfe504362ca527f5823dabb2bfa8d4
BLAKE2b-256 checksum
How to use checksums
d7b03f60f769df54eb7b76b55ae9a225a7064a7830eb3549099b4f8462320d77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.14

Release history Release notifications | RSS feed

This release

0.7.1 This release

3 release files

0.6

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page