Skip to main content

Python BatchMailchimp

PyPI Package latest release License

A light wrapper around mailchimp-marketing that makes it easier to use batch operations.

Getting Started

Installation

pip install batch-mailchimp

Usage

This can be used as a drop-in replacement for mailchimp-marketing – just change the import at the top, and everything should work the same:

import batch_mailchimp as MailchimpMarketing

client = MailchimpMarketing.Client({
    "api_key": "YOUR_API_KEY",
})

The additional functionality comes when we initialise the client with batch=True:

import batch_mailchimp as MailchimpMarketing

client = MailchimpMarketing.Client({
    "api_key": "YOUR_API_KEY",
    "batch": True,
})

If we do this, operations are stored up in the client, to be run later. For example:

# Fetch all MailChimp lists
client.lists.get_all_lists()

All new operations will be added to the batch. When we’re ready, we can run all the operations in the batch:

batch = batch_client.batches.run()

We can check the batch’s status using:

batch.status(refresh=True)

Once it has finished, we can get the response with:

response = batch.response()
response.body

API Structure and Endpoints

The API structure and endpoints match that of mailchimp-marketing. You should refer to their documentation for usage.

Support

If you are having issues, please create an issue.

License

The project is licensed under the MIT License.

Metadata

Release files for batch-mailchimp 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for batch-mailchimp 1.2.2
File Size Uploaded
batch-mailchimp-1.2.2.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for batch-mailchimp 1.2.2
File Interpreter ABI Platform
batch_mailchimp-1.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 12.6 kB

Release files / batch-mailchimp-1.2.2.tar.gz

Download URL batch-mailchimp-1.2.2.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
34d74bb72257d3a2f8d78c5cc624beafe04f2834f8e28590e8061450d3a3db77
BLAKE2b-256 checksum
How to use checksums
9844649b40c7883e994949cf1acef652cedfba38c3a1e6c0371a1dae15d4e5a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.4

Release files / batch_mailchimp-1.2.2-py3-none-any.whl

Download URL batch_mailchimp-1.2.2-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e3e7f53407525479532b1d98f614b2ddb287079e8263f3657aea58e50ca9fd8
BLAKE2b-256 checksum
How to use checksums
69004679e54e9ccb0239deaf2a0974657131cc17b6d6899f7b0e8c4835b0470e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.4

Release history Release notifications | RSS feed

This release

1.2.2 This release

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.14

1 release file

0.0.13

1 release file

0.0.12

1 release file

0.0.11

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page