Skip to content

joaobarbosa/sendgrid-marketing-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SendGrid Marketing API Wrapper

Requirements Status

Unnoficial wrapper for interacting with the SendGrid's Web API V3.

Supports Python 2.7+. NOT TESTED IN PYTHON 3 (yet).

Requirements

Check the requirements.txt for a complete list of dependecies of this library.

Install everything it needs with pip install -r /path/to/requirements.txt

Basic usage

from sendgridmarketingapi.wrapper import SendGridClientWrapper
from sendgridmarketingapi.campaigns import CampaignsManager

apikey = 'your-sendgrid-api-key'
client = SendGridClientWrapper(apikey)
campaign_manager = CampaignsManager(client)

status, data = campaign_manager.get_all_campaigns()

Testing

Tests were built using Py.test with some extensions (pytest-cov, pytest-pep8) and Radon.

Check the requirements.txt for a complete list of dependecies of this library.

Running tests

Note: You should set up an environment variable named SENDGRID_TEST_API_KEY with an valid api key for testing. If you didn't set it before, the script will ask before running the tests.

cd /path/to/project

./runtests.sh

If you want to check radon analysis, you shoud use --with-radon or -r options:

./runtests.sh --with-radon
./runtests.sh -r

About

SendGrid wrapper for API V3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published