Added tag 5.2.5 for changeset 52dd84d97c6d
Added tag 5.2.5 for changeset e80f22956f32
Simple module to interface with the Sendy API (https://sendy.co/api)
Project Links: Issues - Mailing List - Contributing
Author: Peter Sanchez (http://www.petersanchez.com) - (http://www.netlandish.com)
api_keyvaraible for all API calls. This is a required change to the functionality of Sendy as of version 4.0.4. This is a potentially breaking code change. Please update your code to always provide the API key before upgrading to sendypy v0.2.
create_campaignAPI 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 v188.8.131.52
pip install sendypy
Basic Manual Install:
$ python setup.py build $ sudo python setup.py install
Alternative Install (Manually):
Place sendy directory in your Python path. Either in your Python installs site-packages directory or set your $PYTHONPATH environment variable to include a directory where the impersonate directory lives.
All the variables and response values are described in the Sendy API docs
Usage is simple :
from sendy.api import SendyAPI api = SendyAPI( host='https://your-sendy-install.com/sendy/', api_key='YOUR_API_KEY', )
You can also provide the optional
debug variable (defaults to False).
This will print debug into to stdout when sending a request to your
api.subscribe( 'list_id_here', 'firstname.lastname@example.org', 'optional first name', optional_field=value, ... )
country: User's 2 letter country code.
ipaddress: User's IP address.
referrer: The URL where the user signed up from.
gdpr: If you're signing up EU users in a GDPR compliant manner.
hp: Include this 'honeypot' field to prevent spambots.
truethen Sendy will treat subscription as single opt-in regardless of list settings (defaults to
Subscription Status :
Subscriber Count :
Create Campaign :
api.create_campaign( from_name='Your Name', from_email='Your Sender Email', reply_to='Your Reply-to Email', title='Your Email Title', subject='Your Email Subject', plain_text='Plain Text Email Body', html_text='HTML Email Body', list_ids='list_id_1,list_id_2,list_id_3', brand_id='your brand id', query_string='Your query string', send_campaign=0, # default's to 0, use 1 to send email right away segment_ids='segment_id_1,segment_id_2', exclude_list_ids='list_id_1,list_id_2,list_id_3', exclude_segments_ids='segment_id_1,segment_id_2', track_opens=1, # defaults to 1, set to 0 do disable track_clicks=1, query_string='extra data', schedule_date_time='June 15, 2021 6:05pm', schedule_timezone='America/New_York', )
We accept patches submitted via
hg email which is the
included with Mercurial.
Please see our contributing document for more information.
The mailing list where you submit your patches is
~email@example.com. You can also view the
archives on the web here:
To quickly setup your clone of
sendypy to submit to the mailing
list just edit your
.hg/hgrc file and add the following:
[email] to = ~firstname.lastname@example.org [patchbomb] flagtemplate = "sendypy" [diff] git = 1
We have more information on the topic here:
All documentation, libraries, and sample code are Copyright 2016 Netlandish Inc., Peter Sanchez <email@example.com>. The library and sample code are made available to you under the terms of the BSD license which is contained in the included file, BSD-LICENSE.
This software, and lots of other software like it, has been built in support of many of Netlandish's own projects, and the projects of our clients. We would love to help you on your next project so get in touch by dropping us a note at firstname.lastname@example.org.