Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
6a3917f
initial unit tests, Issue #9
brad Aug 28, 2012
c36a56d
some template related method tests
brad Oct 17, 2012
47eba41
some list related method tests
brad Oct 17, 2012
ff14fed
document how to run the tests
brad Oct 17, 2012
0b5c1c3
update deprecated code
brad Oct 17, 2012
bd89622
default std_content00 to blank
brad Oct 17, 2012
67bb4ad
add campaign related testing
brad Oct 18, 2012
7761756
Merge remote-tracking branch 'seansawyer/requests-options' into tests
brad Jan 9, 2013
1b8ea82
test listSubscribe and listUnsubscribe
brad Jan 9, 2013
90817d3
export API tests
brad Jan 9, 2013
b95df15
more docs
brad Jan 9, 2013
ce24582
Merge branch 'tests' of https://github.com/gilbertbw/python-mailsnake…
gilbertbw Jun 29, 2013
ebb3109
Updated to work with latest 'requests' version and be run with nosete…
gilbertbw Jun 30, 2013
6369792
Revert "Updated to work with latest 'requests' version and be run wit…
gilbertbw Jun 30, 2013
bedbaed
Updated to work with latest 'requests' version and be run with nosete…
gilbertbw Jun 30, 2013
83308d2
Added tests to check lists method responds as expected to calls with …
gilbertbw Jul 1, 2013
d530b0b
Merge pull request #21 from gilbertbw/tests
Jul 1, 2013
0cef57d
Attempting to clean this lib up :)
michaelhelmick Jul 2, 2013
35a8d26
Just trying to get a build for travis
michaelhelmick Jul 2, 2013
acb12c9
Secure vars for mailchimp creds
michaelhelmick Jul 2, 2013
8e02d67
Mandrill API key
michaelhelmick Jul 2, 2013
a776bca
import __version__
michaelhelmick Jul 2, 2013
7cad4fa
Always a post, had the wrong "method"
michaelhelmick Jul 2, 2013
4f98ea0
All current tests pass
michaelhelmick Jul 24, 2013
0205dcc
Add some pretty images to README
michaelhelmick Jul 24, 2013
8ea2d6b
Fix README
michaelhelmick Jul 24, 2013
0b3c4bc
Fixes #7
Jul 27, 2013
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ dist/
*.egg-info
*~
*.geany
secret_keys.py

.env
33 changes: 33 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
language: python
python:
- 2.6
- 2.7
env:
global:
# MAILCHIMP_API_KEY
- secure: |-
snHmkspOZFgByMfQh6C966JOtkqsT5spgb5Frhps9jLZTOJPzEi/UxPSPdxQ
b1iSNn30lYgBVarGao5OW5iOAFea2iQurBtHtuyhOiWl+zwm6fuuD8ZHmW4R
QzdPsB5TOG9RfDC5W5+km5vNsXvFV9GhWwUoTJ0gKxJkW+WQLjE=
# MAILCHIMP_LIST_ID
- secure: |-
GjWNYY0kSA5YQXdvymWcUQA8F0uNGLiwl06htyEbY/hG0DrdfJYzYNvos/CS
8JgdIwvSopXmQaalOEjUxL6yAupZqRgeIzyR/VZY521/Wl9ZKaoTBnufJCH1
wuGQdb49Cg/VkQ+LlO3+02S3qOq1x8Zf4572NVEriomKt8wP9nI=
# TEST_RECIPIENT_EMAIL
- secure: |-
e3dE5DwzjvpEhLu2nO7pOIBstBe0ahS+Ugy6tzPX8kIlSLjzNIPg3GWokdw3
rwOuyWd/iqkHOIUWPX4XrVzU08S90tMStHfbfswCnWG46+XuW9FHq7B/MpPJ
v0ePdq/BNIO2vMX5O6Ku+F/d6LWRFJkLcft9d14nV1960iVkeVA=
# MANDRILL_API_KEY
- secure: |-
KSME137xMK3VLxEpBbKoEpdUUUFlwnQglRM7hoxLgGjksQh5V++HclpvAXoq
hQ9arqmgt62Tv8W5m2vpHxoH7az6ErSP2JqykNynkoNfr8elFithBb93i9PP
4CrSvdCV05vcDm5BRUZ2OqA2/t//DPpOxdO4emxTXMfeOz2KDTs=
install: pip install -r requirements.txt
script: nosetests -v -w tests/ --logging-filter="mailsnake" --with-cov --cov mailsnake --cov-config .coveragerc --cov-report term-missing
notifications:
email: false
branches:
only:
- master
15 changes: 15 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
This project is forked from John-Kim Murphy's original MailSnake project (which he no longer actively maintains).

Development Lead
````````````````

- Mike Helmick <mikeh@ydekproductions.com>


Patches and Suggestions
````````````````````````

- `Brad Pitcher <https://github.com/brad>`_
- `vlinhart <https://github.com/vlinhart>`_
- `starenka <https://github.com/starenka>`_,
- `Ryan Tucker <https://github.com/rtucker>`_
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2010-2012 John-Kim Murphy
Copyright (c) 2010-2013 John-Kim Murphy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
139 changes: 0 additions & 139 deletions README.md

This file was deleted.

22 changes: 15 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
MailSnake
=========

.. image:: https://badge.fury.io/py/mailsnake.png
:target: http://badge.fury.io/py/mailsnake
.. image:: https://travis-ci.org/michaelhelmick/python-mailsnake.png?branch=master
:target: https://travis-ci.org/michaelhelmick/python-mailsnake
.. image:: https://pypip.in/d/mailsnake/badge.png
:target: https://crate.io/packages/mailsnake/

``MailSnake`` is a Python wrapper for `MailChimp API 1.3 <http://www.mailchimp.com/api/1.3/>`_ (as well as the `STS API <http://apidocs.mailchimp.com/sts/1.0/>`_, `Export API <http://apidocs.mailchimp.com/export/>`_, and `Mandrill API <http://mandrillapp.com/api/docs/>`_) (Now with support for Python 3)

Installation
------------
::

pip install mailsnake
.. code-block:: bash

$ pip install mailsnake

Usage
-----

Basic Ping
~~~~~~~~~~

::
.. code-block:: python

from mailsnake import MailSnake
from mailsnake.exceptions import *
Expand All @@ -29,7 +37,7 @@ Basic Ping
Mandrill Ping
~~~~~~~~~~~~~

::
.. code-block:: python

mapi = MailSnake('YOUR MANDRILL API KEY', api='mandrill')
mapi.users.ping() # returns "PONG!"
Expand All @@ -38,7 +46,7 @@ Mandrill Ping
STS Example
~~~~~~~~~~~

::
.. code-block:: python

mcsts = MailSnake('YOUR MAILCHIMP API KEY', api='sts')
mcsts.GetSendQuota() # returns something like {'Max24HourSend': '10000.0', 'SentLast24Hours': '0.0', 'MaxSendRate': '5.0'}
Expand All @@ -47,7 +55,7 @@ STS Example
Catching Errors
~~~~~~~~~~~~~~~

::
.. code-block:: python

ms = MailSnake( 'my_wrong_mailchimp_api_key_that_does_not_exist')
try:
Expand All @@ -60,6 +68,6 @@ Note

API parameters must be passed by name. For example:

::
.. code-block:: python

ms.listMemberInfo(id='YOUR LIST ID', email_address='name@email.com')
Binary file added mailsnake/.DS_Store
Binary file not shown.
20 changes: 9 additions & 11 deletions mailsnake/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
from .mailsnake import *
"""
MailSnake
---------

MailSnake is a Python wrapper for the MailSnake API v1.3
"""

__author__ = 'John-Kim Murphy'
__credits__ = [
'John-Kim Murphy',
'Michael Helmick',
'Brad Pitcher',
'vlinhart',
'starenka',
'Ryan Tucker'
]
__version__ = '1.6.1'
__version__ = '2.0.0'

__all__ = ['MailSnake']
from .api import MailSnake
from .exceptions import *
Loading