Skip to main content

Library for using SendGrids newsletter api

Project description

# sendgrid-newsletter
This is a library to interact with the newsletter api built by sendgrid.



## Quick Usage Example

```python
import sendgridnewsletter.client import SendGridMarketing

sendgrid_username = 'someuser'
sendgrid_password = 'somepass'

client = SendGridMarketing(sendgrid_username, sendgrid_password)

# get all email lists
client.lists.all()

# create a list
client.lists.add('listname')

# delete a list
client.lists.delete('listname')

# rename a list
client.lists.rename('oldname', 'newname')

# get a specific list
list = client.lists.get_list('somename')

# get all emails in a list
emails = list.emails()

# check for specific email in list
list.has_email('name@example.com')

# add a single email address
list.add_email('name@example.com', 'name')

# add multiple emails
emails = [
{'email': 'email1@example.com', 'name': 'email name'},
{'email': 'email2@example.com', 'name': 'name email'}]

list.add_emails(emails)

# delete a specific email
list.delete_email('email@example.com

```

## Features
Attempts to make the API more usable.

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

sendgrid-newsletter-0.1.2.tar.gz (3.9 kB view details)

Uploaded Source

File details

Details for the file sendgrid-newsletter-0.1.2.tar.gz.

File metadata

File hashes

Hashes for sendgrid-newsletter-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9759dafcad87292b2c9e087dc02e79631aa138721966936ef035aed865d55802
MD5 9e6366a393a6891f436b6ca08ab4a0a7
BLAKE2b-256 2e89e8a5549aa9d60437c85e17c1dff3a7a43c60c045f72d2ac4595cb4df7abf

See more details on using hashes here.

Supported by

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