SendGrid for Humans
Project description
sendgrify
SendGrid for Humans
Sendgrify is a Python package serving as a wrapper over the email delivery service SendGrid.
This is an attempt to simplify the use of sendgrid-python: the Official Twilio SendGrid Led, Community Driven Python API Library.
Installation
$ pip install sendgrify
Usage
Initialization
Prior to use the package you should get a SendGrid API key.
from sendgrify.core import SendGrid
sg = Sendgrid(api_key='your_sendgrid_api_key',
from_addr='from@example.com',
from_name='Sendgrify')
Sending simple email
sg.send(to='to@example.com',
subject='Sendgrify is nice',
msg='Hi there!\nI am using this cool new Python package')
Sending to several recipients
sg.send(to=['one@example.com', 'two@example.com'],
subject='Sendgrify is nice',
msg='Hi there!\nI am using this cool new Python package')
Sending with carbon copy
sg.send(to='to@example.com',
cc=['one@example.com', 'two@example.com'],
subject='Sendgrify is nice',
msg='Hi there!\nI am using this cool new Python package')
Sending with blind carbon copy
sg.send(to='to@example.com',
bcc=['one@example.com', 'two@example.com'],
subject='Sendgrify is nice',
msg='Hi there!\nI am using this cool new Python package')
Sending with attachments
sg.send(to='to@example.com',
subject='Sendgrify is nice',
msg='Hi there!\nI am using this cool new Python package',
attachments=['README.md', 'system.zip'])
Set the proper path to your attachments.
Sending with html contents
sg.send(to='to@example.com',
subject='Sendgrify is nice',
msg='Hi <b>there</b>!<br><br>I am using this <a href="https://pypi.org/">cool new Python package</a>',
html=True)
Changelog
1.0.1 | 01/03/2021 |
---|
- Fix description and useful tags for PyPi.
1.0.0 | 01/03/2021 |
---|
- Add initial code.
- Add documentation.
- Add tests.
- Add makefile.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sendgrify-1.0.1.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for sendgrify-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e709cc3a91e88ae08cec20c68adb461c9a88546ab1c7871126fd75f2e7e0d430 |
|
MD5 | 4a2de6038655fcd24126b1cbc6bc7835 |
|
BLAKE2b-256 | 19963e6ddcf181243b5de3d83e783bea6b5ab921e5e96be95d8a29648f0e3499 |