Skip to main content

Matimo provider — Mailchimp tools (campaigns, lists, members)

Project description

matimo-mailchimp

Mailchimp tools for Matimo — manage campaigns, lists, and subscribers.

PyPI Docs


Installation

pip install matimo matimo-mailchimp

Available Tools (7 Total)

Tool Description
mailchimp-get-lists List all audiences (lists) in your account
mailchimp-get-list-members Get subscribers in an audience
mailchimp-add-list-member Subscribe an email address to an audience
mailchimp-update-list-member Update subscriber tags, status, or merge fields
mailchimp-remove-list-member Unsubscribe or archive a list member
mailchimp-create-campaign Create a new email campaign
mailchimp-send-campaign Send a campaign to its audience

Quick Start

import asyncio
import os
from matimo import Matimo
from matimo_mailchimp import get_tools_path

async def main():
    matimo = await Matimo.init(get_tools_path())

    # List all audiences
    lists = await matimo.execute('mailchimp-get-lists', {})
    print(lists)

    # Add a subscriber
    await matimo.execute('mailchimp-add-list-member', {
        'list_id': 'abc123def',
        'email_address': 'new@example.com',
        'status': 'subscribed',
        'merge_fields': {'FNAME': 'Jane', 'LNAME': 'Doe'},
    })

    # Create and send a campaign
    campaign = await matimo.execute('mailchimp-create-campaign', {
        'list_id': 'abc123def',
        'subject_line': 'April Newsletter',
        'from_name': 'My Company',
        'reply_to': 'hello@example.com',
    })
    await matimo.execute('mailchimp-send-campaign', {
        'campaign_id': campaign['id'],
    })

asyncio.run(main())

Authentication

export MAILCHIMP_API_KEY="your-api-key-us1"     # includes datacenter suffix
export MAILCHIMP_SERVER_PREFIX="us1"             # datacenter prefix from your API key

Getting Mailchimp API Credentials

  1. Log in to MailchimpProfileExtrasAPI keys
  2. Click Create A Key
  3. Copy the API key — the suffix (us1, us6, etc.) is your server prefix

Documentation


Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

matimo_mailchimp-0.1.0a14.post1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

matimo_mailchimp-0.1.0a14.post1-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file matimo_mailchimp-0.1.0a14.post1.tar.gz.

File metadata

File hashes

Hashes for matimo_mailchimp-0.1.0a14.post1.tar.gz
Algorithm Hash digest
SHA256 fd108bdc415552074e3b5aeeccbb771a362228019c3d662666576a4adb36d6ad
MD5 7c3c992699706cd00970e073e99dc57d
BLAKE2b-256 db9c2409e10d77cff38356c37eadad49f3b6c5a93480e15b1274970150cc6a04

See more details on using hashes here.

File details

Details for the file matimo_mailchimp-0.1.0a14.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for matimo_mailchimp-0.1.0a14.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 22ebadb3cf92171f5f240df327670c867b1963174bf7fab03abd75b1f7dc4bd5
MD5 e9218c850c8c228f4c68627efae4b751
BLAKE2b-256 cd4547ec9d5806d74fd1b16da6f0e25c882cbe78a1aff38db521021ae2786d78

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page