matimo-mailchimp
Mailchimp tools for Matimo - manage campaigns, lists, and subscribers.
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 (server_prefix is required on every call)
lists = await matimo.execute('mailchimp-get-lists', {
'server_prefix': 'us1',
})
print(lists)
# Add a subscriber
await matimo.execute('mailchimp-add-list-member', {
'server_prefix': 'us1',
'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', {
'server_prefix': 'us1',
'list_id': 'abc123def',
'subject_line': 'April Newsletter',
'from_name': 'My Company',
'reply_to': 'hello@example.com',
})
await matimo.execute('mailchimp-send-campaign', {
'server_prefix': 'us1',
'campaign_id': campaign['id'],
})
asyncio.run(main())
Authentication
export MAILCHIMP_API_KEY="your-api-key-us1" # includes datacenter suffix
Every tool also requires a server_prefix parameter (e.g. 'us1') passed
directly in the call - it is not read from an environment variable.
Getting Mailchimp API Credentials
- Log in to Mailchimp → Profile → Extras → API keys
- Click Create A Key
- Copy the API key - the suffix (
us1,us6, etc.) is your server prefix, used as theserver_prefixparameter
Documentation
Links
- PyPI: https://pypi.org/project/matimo-mailchimp/
- GitHub: https://github.com/tallclub/matimo
- Mailchimp Developer Docs: https://mailchimp.com/developer/
Release files for matimo-mailchimp 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| matimo_mailchimp-0.1.3.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| matimo_mailchimp-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.5 kB
Release files / matimo_mailchimp-0.1.3.tar.gz
| Download URL | matimo_mailchimp-0.1.3.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b04525fa08f0a95c98c43239118f96fb13a384eb76f3aedfeeaea448be213ad
|
|
BLAKE2b-256 checksum How to use checksums |
d9e7fdddc81ca3ad9f58f0403e0bcf6555b5658b8de610cebd6130fe673019ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / matimo_mailchimp-0.1.3-py3-none-any.whl
| Download URL | matimo_mailchimp-0.1.3-py3-none-any.whl |
|---|---|
| Size | 11.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
284ae33f9cbee9792bc2173ed14597139c782e7d8bafeb5a602cc191c0d07178
|
|
BLAKE2b-256 checksum How to use checksums |
fecca32fa0fd2a498d0762833f703e9f94c1e08038c0eb8b8aa986084f25f9be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|