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.1.tar.gz (3.9 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for sendgrid-newsletter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 43de4e64c6fed7f7235a6d62c6f8022187f302dba54040275b1830acd39955d9
MD5 41315b45174456199b7902750ffede48
BLAKE2b-256 3b2e8516f6fce9890c8aaacd36bc8fbe1c946cee4cbea2de0a4994f99ec3f134

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