https://github.com/kudo/mailchimp_manager
https://github.com/kudo/mailchimp_manager
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/kudo/mailchimp_manager
- Owner: Kudo
- License: other
- Created: 2012-04-12T10:30:12.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2012-04-12T10:59:24.000Z (almost 14 years ago)
- Last Synced: 2025-03-20T16:51:19.046Z (10 months ago)
- Language: Python
- Homepage:
- Size: 97.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
MailChimp Manager
====================
1. Introduction
---------------------
MailChimp Manager is a wrapper for MailChimp.com's version 1.3 API focus on management usage
2. Installation
---------------------
- Download mailchimp_manager to somewhere and use locally
- Download whole package and use 'python setup.py install' to install globally
3. Usage
---------------------
```python
from mailchimp_manager import MailChimpManager
listMgr = MailChimpManager.ListManager('Your-API-Key')
listMgr.subscribe('foo@bar.com') # Add foo@bar.com to subscribed list
listMgr.unsubscribe('foo@bar.com') # Move foo@bar.com to unsubscribed list
listMgr.listMembers() # List subscribed list
listMgr.listMembers(MailChimpManager.ListManager.MEMBER_STATUS.SUBSCRIBED) # List subscribed list, again
listMgr.listMembers(MailChimpManager.ListManager.MEMBER_STATUS.UNSUBSCRIBED) # List unsubscribed list
```
You can also put a settings.py in the program folder as global settings.
```python
API_HOST_SCHEME='http'
API_VERSION='1.3'
API_HOST='api.mailchimp.com/%s/?method=' % (API_VERSION)
API_KEY = 'Your-API-Key'
```
Then you don't need you can simply use ListManager() without specifying API key every time.
4. Limiations
---------------------
- Currently only support list management
- Currently support only one list