Skip to main content

Simple wrapper to use SendGrid SMTP API

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smtpapi-0.4.12.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smtpapi-0.4.12-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file smtpapi-0.4.12.tar.gz.

File metadata

  • Download URL: smtpapi-0.4.12.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for smtpapi-0.4.12.tar.gz
Algorithm Hash digest
SHA256 183f7fef3eb22d67965f4611047274f13e2958c195b611f8ffc9a17d51885b89
MD5 03c363fa8450b6bbcf81f59de163aaee
BLAKE2b-256 b1b3cc1a3e343f709c4eff70a23a976a3d07b04522ed5fd3976d0e6f72542239

See more details on using hashes here.

File details

Details for the file smtpapi-0.4.12-py3-none-any.whl.

File metadata

  • Download URL: smtpapi-0.4.12-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for smtpapi-0.4.12-py3-none-any.whl
Algorithm Hash digest
SHA256 6ac5a8a7380e5fe689bdf2270acf78b1cb3dfbde73c5fd9e457702626b38e145
MD5 9550f47b1482abad92a12f250f533b9a
BLAKE2b-256 08f8a6870add5c6fc9e7d0e29ea4107dd27314d7daa893f34e847750d5f31344

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page