|
| 1 | +.. image:: https://uiux.s3.amazonaws.com/2016-logos/email-logo%402x.png |
| 2 | + :target: https://www.sendgrid.com |
| 3 | + :alt: SendGrid Logo |
| 4 | + |
| 5 | +|Travis Badge| |Email Notifications Badge| |Twitter Follow| |Codecov branch| |Python Versions| |PyPI Version| |GitHub contributors| |MIT Licensed| |
| 6 | + |
| 7 | +**This module helps build SendGrid's SMTP API headers.** |
| 8 | + |
| 9 | +Learn more about the SMTP API at `SendGrid documentation`_. |
| 10 | + |
| 11 | +Announcements |
| 12 | +============= |
| 13 | + |
| 14 | +All updates to this module is documented in our `CHANGELOG`_. |
| 15 | + |
| 16 | +Table of Contents |
| 17 | +================= |
| 18 | + |
| 19 | +- `Installation <#installation>`__ |
| 20 | +- `Quick Start <#quick-start>`__ |
| 21 | +- `Usage <#usage>`__ |
| 22 | +- `Roadmap <#roadmap>`__ |
| 23 | +- `How to Contribute <#how-to-contribute>`__ |
| 24 | +- `Local Setup of the Project <#local-setup-of-the-project>`__ |
| 25 | +- `About <#about>`__ |
| 26 | +- `License <#license>`__ |
| 27 | + |
| 28 | +Installation |
| 29 | +============ |
| 30 | + |
| 31 | +Prerequisites |
| 32 | +------------- |
| 33 | + |
| 34 | +- Python version 2.6, 2.7, 3.4 or 3.5 |
| 35 | +- The SendGrid service, starting at the `free level`_ |
| 36 | + |
| 37 | +Install Package |
| 38 | +--------------- |
| 39 | + |
| 40 | +.. code:: bash |
| 41 | +
|
| 42 | + pip install smtpapi |
| 43 | +
|
| 44 | +Setup Environment Variables |
| 45 | +--------------------------- |
| 46 | + |
| 47 | +Update the development environment with your `SENDGRID_API_KEY`_, for example: |
| 48 | + |
| 49 | +.. code:: bash |
| 50 | +
|
| 51 | + cp .env_sample .env |
| 52 | +
|
| 53 | +In ``.env`` set ``SENDGRID_API_KEY`` to your own API key. |
| 54 | + |
| 55 | +You can add your environment variables to your environment by sourcing the file: |
| 56 | + |
| 57 | +.. code:: bash |
| 58 | +
|
| 59 | + source .env |
| 60 | +
|
| 61 | +Quick Start |
| 62 | +=========== |
| 63 | + |
| 64 | +.. code:: python |
| 65 | +
|
| 66 | + from smtpapi import SMTPAPIHeader |
| 67 | +
|
| 68 | + header = SMTPAPIHeader() |
| 69 | + header.add_to('[email protected]') |
| 70 | + print(header.json_string()) |
| 71 | +
|
| 72 | +Usage |
| 73 | +===== |
| 74 | + |
| 75 | +- `SendGrid documentation`_ |
| 76 | +- `Example Code`_ |
| 77 | + |
| 78 | +Roadmap |
| 79 | +======= |
| 80 | + |
| 81 | +If you are interested in the future direction of this project, please take a look at our `milestones`_. |
| 82 | +We would love to hear your feedback. |
| 83 | + |
| 84 | +How to Contribute |
| 85 | +================= |
| 86 | + |
| 87 | +We encourage contribution to our projects, please see our `CONTRIBUTING`_ guide for details. |
| 88 | + |
| 89 | +Quick links: |
| 90 | + |
| 91 | +- `Feature Request`_ |
| 92 | +- `Bug Reports`_ |
| 93 | +- `Sign the CLA to Create a Pull Request`_ |
| 94 | +- `Improvements to the Codebase`_ |
| 95 | + |
| 96 | +Local Setup of the Project |
| 97 | +========================== |
| 98 | + |
| 99 | +The simplest local development workflow is by using docker. |
| 100 | + |
| 101 | +Steps: |
| 102 | + |
| 103 | +1. Install Docker |
| 104 | +2. Run ``docker-compose build`` (this builds the container) |
| 105 | +3. Run ``docker-compose up`` (this runs tests by default) |
| 106 | + |
| 107 | +About |
| 108 | +===== |
| 109 | + |
| 110 | +**smtpapi-python** is guided and supported by the SendGrid `Developer Experience Team`_. |
| 111 | + |
| 112 | +**smtpapi-python** is maintained and funded by SendGrid, Inc. |
| 113 | +The names and logos for **smtpapi-python** are trademarks of SendGrid, Inc. |
| 114 | + |
| 115 | +License |
| 116 | +======= |
| 117 | + |
| 118 | +`The MIT License (MIT)`_ |
| 119 | + |
| 120 | +.. _SendGrid documentation: https://sendgrid.com/docs/API_Reference/SMTP_API/index.html |
| 121 | +.. _CHANGELOG: https://github.com/sendgrid/smtpapi-python/blob/master/CHANGELOG.md |
| 122 | +.. _free level: https://sendgrid.com/free?source=sendgrid-python |
| 123 | +.. _SENDGRID_API_KEY: https://app.sendgrid.com/settings/api_keys |
| 124 | +.. _Example Code: https://github.com/sendgrid/smtpapi-python/tree/master/examples |
| 125 | +.. _milestones: https://github.com/sendgrid/smtpapi-python/milestones |
| 126 | +.. _CONTRIBUTING: https://github.com/sendgrid/smtpapi-python/blob/master/CONTRIBUTING.md |
| 127 | +.. _Feature Request: https://github.com/sendgrid/smtpapi-python/blob/master/CONTRIBUTING.md#feature-request |
| 128 | +.. _Bug Reports: https://github.com/sendgrid/smtpapi-python/blob/master/CONTRIBUTING.md#submit-a-bug-report |
| 129 | +.. _Sign the CLA to Create a Pull Request: https://github.com/sendgrid/smtpapi-python/blob/master/CONTRIBUTING.md#cla |
| 130 | +.. _Improvements to the Codebase: https://github.com/sendgrid/smtpapi-python/blob/master/CONTRIBUTING.md#improvements-to-the-codebase |
| 131 | +.. _ Developer Experience Team: mailto:[email protected] |
| 132 | +.. _The MIT License (MIT): https://github.com/sendgrid/smtpapi-python/blob/master/LICENSE.txt |
| 133 | + |
| 134 | +.. |Travis Badge| image:: https://travis-ci.org/sendgrid/smtpapi-python.svg?branch=master |
| 135 | + :target: https://travis-ci.org/sendgrid/smtpapi-python |
| 136 | +.. |Email Notifications Badge| image:: https://dx.sendgrid.com/badge/python |
| 137 | + :target: https://dx.sendgrid.com/newsletter/python |
| 138 | +.. |Twitter Follow| image:: https://img.shields.io/twitter/follow/sendgrid.svg?style=social&label=Follow |
| 139 | + :target: https://twitter.com/sendgrid |
| 140 | +.. |Codecov branch| image:: https://img.shields.io/codecov/c/github/sendgrid/smtpapi-python/master.svg?style=flat-square&label=Codecov+Coverage |
| 141 | + :target: https://codecov.io/gh/sendgrid/smtpapi-python |
| 142 | +.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/smtpapi.svg |
| 143 | + :target: https://pypi.org/project/smtpapi/ |
| 144 | +.. |PyPI Version| image:: https://img.shields.io/pypi/v/smtpapi.svg |
| 145 | + :target: https://pypi.org/project/smtpapi/ |
| 146 | +.. |GitHub contributors| image:: https://img.shields.io/github/contributors/sendgrid/smtpapi-python.svg |
| 147 | + :target: https://github.com/sendgrid/smtpapi-python/graphs/contributors |
| 148 | +.. |MIT Licensed| image:: https://img.shields.io/badge/license-MIT-blue.svg |
| 149 | + :target: https://github.com/sendgrid/smtpapi-python/blob/master/LICENSE.txt |
0 commit comments