sendgrid
Twilio SendGrid library for Python
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has low install friction, carries no license restrictions, and is the official client for a widely-used email delivery service. It is suitable for any Python project that needs to send email or SMS at scale. No known vulnerabilities as of the fact sheet date.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires SENDGRID_API_KEY environment variable set with a valid SendGrid API key; a SendGrid account is needed to send email.
- Low install friction with a pure-Python wheel.
- Actively maintained with recent releases; last commit 2026-06-25.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
last release 2025-09-19 (329 days) · last repo commit 2026-06-25 · 1,630 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 28,330,843 downloads/mo, #837 on PyPI
Alternatives
Verify before relying
pip install sendgrid
import os
from sendgrid import SendGridAPIClient
from sendgrid.helpers.mail import Mail
message = Mail(
from_email='from@example.com',
to_emails='to@example.com',
subject='Test',
html_content='Hello')
sg = SendGridAPIClient(os.environ.get('SENDGRID_API_KEY'))
response = sg.send(message)- Whether the package still supports Python 2.7 in practice despite classifiers listing it—version 6.X is noted as a breaking change from 5.X
- Current state of inbound email parsing helper and whether it remains actively maintained
- Performance characteristics or rate-limiting behavior when sending bulk messages
What it is and what it does
This is the official Python client library for Twilio SendGrid's Web API v3. It provides two main ways to send email: a high-level Mail helper class that abstracts message construction, and a lower-level dictionary-based API for direct control. It also supports sending SMS messages via Twilio and exposes the full SendGrid API surface through a fluent interface, allowing you to query suppression lists, manage contacts, and access other account features.
The library requires a SendGrid API key (set via the SENDGRID_API_KEY environment variable) and a SendGrid account to send email, or a Twilio account for SMS. It depends on python-http-client for HTTP transport, cryptography for secure operations, and werkzeug for utility functions. Installation is straightforward via pip, and the library supports modern Python versions.
Use it for
- Send transactional emails (password resets, order confirmations) using the Mail helper class with minimal setup.
- Query SendGrid suppression lists (bounces, unsubscribes) via the fluent API to manage email deliverability.
- Send SMS notifications through Twilio integration when email alone is insufficient.
- Build bulk email campaigns by constructing personalizations and templates via the Mail helper.
- Process inbound email webhooks using the library's inbound parse helper to handle incoming messages.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has low install friction, carries no license restrictions, and is the official client for a widely-used email delivery service. It is suitable for any Python project that needs to send email or SMS at scale. No known vulnerabilities as of the fact sheet date.
Install
sendgrid on PyPI
Before you install
Low install friction with a pure-Python wheel. Actively maintained with recent releases; last commit 2026-06-25. Requires three runtime dependencies: python-http-client, cryptography, and werkzeug.
Requires SENDGRID_API_KEY environment variable set with a valid SendGrid API key; a SendGrid account is needed to send email.
License in practice
MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install sendgrid
import os
from sendgrid import SendGridAPIClient
from sendgrid.helpers.mail import Mail
message = Mail(
from_email='from@example.com',
to_emails='to@example.com',
subject='Test',
html_content='Hello')
sg = SendGridAPIClient(os.environ.get('SENDGRID_API_KEY'))
response = sg.send(message)
Verify before relying
- Whether the package still supports Python 2.7 in practice despite classifiers listing it—version 6.X is noted as a breaking change from 5.X
- Current state of inbound email parsing helper and whether it remains actively maintained
- Performance characteristics or rate-limiting behavior when sending bulk messages
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release !=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagespython-http-clientcryptographywerkzeug |
| Maintenance | Actively maintained 329 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 28,330,843 / month, #837 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: sendgrid-6.12.5-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “twilio sendgrid library”
- sendgridSends emails and SMS messages via the Twilio SendGrid Web API v3,…
- twilioPython client library for the Twilio API that enables sending SMS…
- apache-airflow-providers-sendgridIntegrates SendGrid email delivery into Apache Airflow workflows,…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also django-sendgrid-v5 · notifications-python-client · python-http-client · smtpapi · twilio · twilio-stubs · apache-airflow-providers-sendgrid · smpplib · types-python-http-client · sib-api-v3-sdk