Skip to main content

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)

Installation

pip install mailsnake

Usage

Basic Ping

from mailsnake import MailSnake
from mailsnake.exceptions import *

ms = MailSnake('YOUR MAILCHIMP API KEY')
try:
    ms.ping() # returns "Everything's Chimpy!"
except MailSnakeException:
    print 'An error occurred. :('

Mandrill Ping

mapi = MailSnake('YOUR MANDRILL API KEY', api='mandrill')
mapi.users.ping() # 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:
    ms.ping() # returns "Everything's Chimpy!"
except InvalidApiKeyException:
    print 'You have a bad API key, sorry.'

Note

API parameters must be passed by name. For example:

ms.listMemberInfo(id='YOUR LIST ID', email_address='name@email.com')

Metadata

Release files for mailsnake 1.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mailsnake 1.6.0
File Size Uploaded
mailsnake-1.6.0.tar.gz 5.9 kB Details

Release files / mailsnake-1.6.0.tar.gz

Download URL mailsnake-1.6.0.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ff3b7fd10afa5bb3a945f6576ec6affed9ba130ecfa1b45885b8485b452605b3
BLAKE2b-256 checksum
How to use checksums
60a9b35932ca683bb338266283dfad6de31cf225ad635b39f7055844f9f65798
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.6.4

1 release file

1.6.3

1 release file

1.6.2

1 release file

1.6.1

1 release file

This release

1.6.0 This release

1 release file

1.5.0

1 release file

1.4.0

1 release file

1.3.5

1 release file

1.3.4

1 release file

1.3.3

1 release file

1.3.2

1 release file

1.3.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page