python how to use mailchimp to send email
Question: I have been reading a lot on internet to know how can i use python to send
emails using mailchimp api

it seems that the website is so complected and doesn't have any example,

please could you guide me to any example to use pytyon

### what I tried

i installed the library from pip using

    
    
    pip install mailchimp
    

i have created the campain

i have created the lists

but yet i couldn't know how to send the emails programmatically


Answer: If you want to trigger a campaign see:

<https://apidocs.mailchimp.com/api/2.0/campaigns/send.php>

The typical module `mailchimp` at pypi supports it as followed.

    
    
    from mailchimp import Mailchimp
    mailchimp = Mailchimp(api_key)
    mailchimp.campaigns.send(campaign_id)
    

Sourcecode at: <https://bitbucket.org/mailchimp/mailchimp-api-
python/src/32ed2394d6b49d7551089484221fa3ee019bee37/mailchimp.py?at=master>

Hope it helps.

Cheers, mrcrgl

