import mailchimpapikey = "<my api key>"
m = mailchimp.Mailchimp(apikey)
list = m.lists.list()
id = list["data"][0]["id"]
webid = list["data"][0]["web_id"]
m.lists.subscribe(apikey,id,{"email":"myEmail...@gmail.com","leid":webid})
import mailchimp
apikey = "<my api key>"
m = mailchimp.Mailchimp(apikey)
list = m.lists.list()
id = list["data"][0]["id"]
#webid = list["data"][0]["web_id"]
email = {"email":"exa...@examples.com"}
m.lists.subscribe(apikey,id,email)
Traceback (most recent call last): File "/Library/WebServer/Documents/Also/Github/kantelberg/emails/mailchimpexample.py", line 9, in <module> m.lists.subscribe(apikey,myId,email) File "/Library/Python/2.7/site-packages/mailchimp.py", line 2213, in subscribe return self.master.call('lists/subscribe', _params) File "/Library/Python/2.7/site-packages/mailchimp.py", line 349, in call raise self.cast_error(result)mailchimp.ValidationError: Validation error: {"email":"Please enter a struct\/associative array"}