Skip to main content

MailChimp API v1.3, STS, Export, Mandrill wrapper for Python.

Project description

MailSnake is a Python wrapper for MailChimp API 1.3 (as well as the STS API, Export API, and Mandrill API) (Now with support for Python 3)


pip install mailsnake


Basic Ping

from mailsnake import MailSnake
from mailsnake.exceptions import *

try: # returns "Everything's Chimpy!"
except MailSnakeException:
    print 'An error occurred. :('

Mandrill Ping

mapi = MailSnake('YOUR MANDRILL API KEY', api='mandrill') # returns "PONG!"

STS Example

mcsts = MailSnake('YOUR MAILCHIMP API KEY', api='sts')
mcsts.GetSendQuota() # returns something like {'Max24HourSend': '10000.0', 'SentLast24Hours': '0.0', 'MaxSendRate': '5.0'}

Catching Errors

ms = MailSnake( 'my_wrong_mailchimp_api_key_that_does_not_exist')
try: # returns "Everything's Chimpy!"
except InvalidApiKeyException:
    print 'You have a bad API key, sorry.'


API parameters must be passed by name. For example:

ms.listMemberInfo(id='YOUR LIST ID', email_address='')

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mailsnake, version 1.6.4
Filename, size File type Python version Upload date Hashes
Filename, size mailsnake-1.6.4.tar.gz (6.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page