Add subscriber to mailchimp with python [closed]
-
12-12-2019 - |
سؤال
What is the simplest way - or library - to add a subscriber to mailchimp with python 2.5 on google app engine?
المحلول
mailsnake and PostMonkey both require Requests library, which dropped python 2.5 support with 0.10.1.
The simplest path seems to be chimpy.
Code Sample:
from chimpy import chimpy
chimp = chimpy.Connection('MAILCHIMP_APIKEY')
chimp.list_subscribe('your_list_id', self.request.get('email'), {'FIRST': '', 'LAST': ''}, double_optin=False)
نصائح أخرى
The MailChimp API has all the details for the functionality that you want.
- API Documentation : http://apidocs.mailchimp.com
- Python libraries: http://apidocs.mailchimp.com/api/downloads/ and go to Python section
- Subscribe an email to a list : http://apidocs.mailchimp.com/api/1.3/listsubscribe.func.php
Hope this helps.
لا تنتمي إلى StackOverflow