MailSnake
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.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mailsnake-1.6.4.tar.gz | 6.6 kB | Without provenance | Details for mailsnake-1.6.4.tar.gz |
Release files / mailsnake-1.6.4.tar.gz
| Download URL | mailsnake-1.6.4.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f1ed90342fa1f832765425e706c396393d958c1eeb807820df5b05d93e97086
|
|
BLAKE2b-256 checksum How to use checksums |
897617c500b9c306b9f09f6e1e0404d20d1941a04575f0d4a4c479772e898c1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for mailsnake 1.6.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.