mailchimp3 is a Python client library for interacting with version 3 of the Mailchimp API. It provides a straightforward interface to manage contacts, lists, campaigns, and other Mailchimp resources. The library is currently at version 3.0.21 and maintains an active development status with updates for API changes and bug fixes.
pip install mailchimp3Verified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the `MailChimp` client using an API key and an optional username, and then how to fetch all audience lists. It's best practice to use environment variables for sensitive credentials.
Update your client initialization to `MailChimp(mc_api='YOUR_API_KEY', mc_user='YOUR_USERNAME')`. If you're using basic authentication, `mc_user` is optional.
Consolidate contacts into one master audience and utilize Mailchimp's tagging and grouping features for segmentation and targeted communication.
Implement regular list cleaning processes and ensure all sign-up forms clearly communicate consent, following relevant data privacy regulations.
Review your Mailchimp usage and consider upgrading to a paid plan or exploring alternative services if your needs exceed the new free plan limits and features.
When initializing the `MailChimp` client, use `mc_api='YOUR_API_KEY'` instead of `mc_secret='YOUR_API_KEY'`.
Verify that the IDs (list ID, member ID, campaign ID, etc.) and template names used in your API calls are accurate and correspond to existing resources in your Mailchimp account.
Ensure all required merge fields (e.g., FNAME, LNAME) are provided in the payload for member creation/updates, and that their names precisely match the case and type defined in your Mailchimp list settings.