batch-mailchimp-0.0.9
توضیحات
A python client for v3 of MailChimp API, with batch support
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | batch-mailchimp-0.0.9 |
| نام | batch-mailchimp |
| نسخه کتابخانه | 0.0.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Andy Lulham |
| ایمیل نویسنده | andy.lulham@fullfact.org |
| آدرس صفحه اصلی | https://github.com/FullFact/python-batchmailchimp |
| آدرس اینترنتی | https://pypi.org/project/batch-mailchimp/ |
| مجوز | MIT |
Python BatchMailchimp
=====================
.. image:: https://img.shields.io/pypi/v/batch-mailchimp.svg
:alt: PyPI Package latest release
:target: https://pypi.org/project/batch-mailchimp/
.. image:: https://img.shields.io/pypi/l/batch-mailchimp.svg
:alt: License
:target: https://pypi.org/project/batch-mailchimp/
A light wrapper around `mailchimp3 <https://pypi.org/project/mailchimp3/>`__ 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 mailchimp3 – just change
the import at the top, and everything should work the same:
.. code:: python
from batch_mailchimp import BatchMailChimp as MailChimp
client = MailChimp(
mc_api='YOUR_API_KEY',
mc_user='YOUR_USERNAME')
The additional functionality comes when we initialise the client with ``batch=True``:
.. code:: python
from batch_mailchimp import BatchMailChimp as MailChimp
batch_client = MailChimp(
mc_api='YOUR_API_KEY',
mc_user='YOUR_USERNAME',
batch=True)
If we do this, operations are stored up in the client, to be run later. For example:
.. code:: python
# add John Doe with email john.doe@example.com to list matching id '123456'
batch_client.lists.members.create(
'123456', {
'email_address': 'john.doe@example.com',
'status': 'subscribed',
'merge_fields': {
'FNAME': 'John',
'LNAME': 'Doe',
},
},
)
All new operations will be added to the batch. When we’re ready, we can run all the operations in the batch:
.. code:: python
batch = batch_client.batch.run()
We can check the batch’s status using:
.. code:: python
batch.status()
API Structure and Endpoints
---------------------------
The API structure and endpoints match that of `mailchimp3 <https://pypi.org/project/mailchimp3/>`__. You should refer to their documentation for usage.
Support
-------
If you are having issues, please `create an issue <https://github.com/FullFact/python-batchmailchimp/issues>`__.
License
-------
The project is licensed under the MIT License.
نحوه نصب
نصب پکیج whl batch-mailchimp-0.0.9:
pip install batch-mailchimp-0.0.9.whl
نصب پکیج tar.gz batch-mailchimp-0.0.9:
pip install batch-mailchimp-0.0.9.tar.gz