Python Interface for the Sendy API
Project description
sendypy
Dependencies
- It was written for Python 2.7+
- Depends on the requests module
NOTE:
- Version 1.3b adds the new “title” variable to the create_campaign API call. It effects the default ordering of variables in the call. If you’re upgrading from a previous version please ensure that you account for the new ordering of variables. This new variable was added in Sendy v2.1.2.6
Installation.
Use
All the variables and response values are described in the Sendy API docs
Usage is simple
from sendy.api import SendyAPI api = SendyAPI(host='', api_key='YOUR_API_KEY')
You don’t need to set the api_key variable if you’re using the subscribe or unsubscribe methods. You can also provide the optional “debug” variable (defaults to False). This will print debug into to stdout when sending a request to your Sendy install.
Subscribe
api.subscribe('list_id_here', 'email@address.com', 'optional first name', custom_field_1='value', custom_field_2='value', ...)
Unsubscribe
api.unsubscribe('list_id_here', 'email@address.com') )
All documentation, libraries, and sample code are Copyright 2016 Netlandish Inc.,.
Project details
Release history Release notifications
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.