Skip to main content
SendGrid Logo

Test and Deploy Badge Twitter Follow Codecov branch Python Versions PyPI Version GitHub contributors MIT Licensed

This module helps build SendGrid’s SMTP API headers.

Learn more about the SMTP API at SendGrid documentation.

Announcements

The default branch name for this repository has been changed to `main` as of 07/27/2020.

All the updates to this module are documented in our CHANGELOG.

Table of Contents

Installation

Prerequisites

  • Python version 2.7 or 3.4+

  • The SendGrid service, starting at the free level

Install Package

pip install smtpapi

Setup Environment Variables

Update the development environment with your SENDGRID_API_KEY, for example:

cp .env_sample .env

In .env set SENDGRID_API_KEY to your own API key.

You can add your environment variables to your environment by sourcing the file:

source .env

Quick Start

from smtpapi import SMTPAPIHeader

header = SMTPAPIHeader()
header.add_to('email@email.com')
print(header.json_string())

Usage

How to Contribute

We encourage contribution to our projects, please see our CONTRIBUTING guide for more details.

Quick links:

Local Setup of the Project

The simplest local development workflow is by using Docker.

Steps:

  1. Install [Docker](https://www.docker.com/)

  2. Run docker-compose build (this builds the container)

  3. Run docker-compose up (this runs tests by default)

About

smtpapi-python is maintained and funded by Twilio SendGrid, Inc. The names and logos for smtpapi-python are trademarks of Twilio SendGrid, Inc.

License

The MIT License (MIT)

Metadata

Release files for smtpapi 0.4.12

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

Source distribution (sdist)

Source distribution for smtpapi 0.4.12
File Size Uploaded
smtpapi-0.4.12.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for smtpapi 0.4.12
File Interpreter ABI Platform
smtpapi-0.4.12-py3-none-any.whl Python 3 none any Details

Total release size: 9.3 kB

Release files / smtpapi-0.4.12.tar.gz

Download URL smtpapi-0.4.12.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
183f7fef3eb22d67965f4611047274f13e2958c195b611f8ffc9a17d51885b89
BLAKE2b-256 checksum
How to use checksums
b1b3cc1a3e343f709c4eff70a23a976a3d07b04522ed5fd3976d0e6f72542239
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

Release files / smtpapi-0.4.12-py3-none-any.whl

Download URL smtpapi-0.4.12-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6ac5a8a7380e5fe689bdf2270acf78b1cb3dfbde73c5fd9e457702626b38e145
BLAKE2b-256 checksum
How to use checksums
08f8a6870add5c6fc9e7d0e29ea4107dd27314d7daa893f34e847750d5f31344
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

Release history Release notifications | RSS feed

This release

0.4.12 This release

2 release files

0.4.10

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

3 release files

0.4.1

3 release files

0.3.1

1 release file

0.3.0

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.1

2 release files

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