mailchimp3


Namemailchimp3 JSON
Version 3.0.21 PyPI version JSON
download
home_pagehttps://github.com/charlesthk/python-mailchimp
SummaryA python client for v3 of MailChimp API
upload_time2023-06-13 07:12:31
maintainer
docs_urlNone
authorCharles TISSIER
requires_python
licenseMIT
keywords mailchimp api v3 client wrapper
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            |mailchimp3 v3.0.21 on PyPi| |MIT license| |Stable|

python-mailchimp-api
====================

A straightforward python client for v3 of MailChimp API using requests
>= 2.7.0.

Getting Started
---------------

Installation
~~~~~~~~~~~~

This client is hosted at PyPi under the name ``mailchimp3``, to install
it, simply run

``pip install mailchimp3``

Upgrading from v2.x
~~~~~~~~~~~~~~~~~~~

The order of arguments for initializing the Mailchimp API has been
reversed starting in 2.1.0 as the username is an optional argument for
basic auth. Please reverse the order of your arguments or remove the
username argument entirely. The name of the authentication argument has
also changed from ``mc_secret`` to ``mc_api``.

Upgrading from v1.x
~~~~~~~~~~~~~~~~~~~

The installation procedure for 2.x is the same as before, however there
are a massive number of changes to the naming conventions within this
wrapper and the way in which certain methods are called. Please read the
documentation below carefully for information on the new structure and
expanded functionality. With this release, all documented endpoints are
implemented and all endpoint methods are available.

History
~~~~~~~

Up to date with
`changelog <http://developer.mailchimp.com/documentation/mailchimp/guides/changelog/>`__
features listed through 3/03/2017.

Initialization
~~~~~~~~~~~~~~

Grab ``YOUR_API_KEY`` from your mailchimp account (Account > Extra > Api
Keys). ``YOUR_USERNAME`` is the one you use to log in on the website and
is optional.

::

   from mailchimp3 import MailChimp

   client = MailChimp(mc_api='YOUR_API_KEY', mc_user='YOUR_USERNAME')

OAuth Support
~~~~~~~~~~~~~

In addition to HTTP Basic Authentication, MailChimp supports
authentication through OAuth2. Information on obtaining the proper
access key can be found
`here <http://developer.mailchimp.com/documentation/mailchimp/guides/how-to-use-oauth2/>`__.

Pagination
~~~~~~~~~~

Simply add ``count`` and ``offset`` arguments in your function. The
count is how many records to return, the offset is how many records to
skip. For endpoints that allow the pagination parameters, the all()
method has an additional boolean ``get_all`` argument that will loop
through all records until the API no longer returns any to get all
records without manually performing an additional query. By default,
count is 10 and offset is 0 for all endpoints that support it. The
``get_all`` parameter on the all() method on any endpoint defaults to
false, which follows the values that are provided in the call, and using
``get_all=True`` will ignore the provided offset to ensure that all
records are returned. When using get_all, the count will be 500 unless
otherwise specified. It is strongly recommended to avoid small values
for ``count`` to fetch large numbers of records because this will flood
the system. A large ``count`` size should not impact calls which are
expected to return a very small number of records, and should improve
performance for calls where fetching 500 records would only provide a
fraction by preventing the delay of making a huge number of requests.

::

   client.lists.members.all('123456', count=100, offset=0)

Fields
~~~~~~

Many endpoints allow you to select which fields will be returned out of
all available fields (for example, only the email_address of a member).
Simply add ``fields`` arguments in your function. The following only
display email_address and id for each member in list 123456:

::

   client.lists.members.all('123456', get_all=True, fields="members.email_address,members.id")

Examples
~~~~~~~~

::

   # returns all the lists (only name and id)
   client.lists.all(get_all=True, fields="lists.name,lists.id")

   # returns all members inside list '123456'
   client.lists.members.all('123456', get_all=True)

   # return the first 100 member's email addresses for the list with id 123456
   client.lists.members.all('123456', count=100, offset=0, fields="members.email_address")

   # returns the list matching id '123456'
   client.lists.get('123456')

   # add John Doe with email john.doe@example.com to list matching id '123456'
   client.lists.members.create('123456', {
       'email_address': 'john.doe@example.com',
       'status': 'subscribed',
       'merge_fields': {
           'FNAME': 'John',
           'LNAME': 'Doe',
       },
   })

   # returns all the campaigns
   client.campaigns.all(get_all=True)

   # You can also disable at runtime with the optional ``enabled`` parameter.
   # Every API call will return None
   client = MailChimp('YOUR SECRET KEY', enabled=False)

   # You are encouraged to specify a value in seconds for the ``timeout``
   # parameter to avoid hanging requests.
   client = MailChimp('YOUR SECRET KEY', timeout=10.0)

   # You are encouraged to specify a User-Agent for requests to the MailChimp
   # API. Headers can be specified using the ``request_headers`` parameter.
   headers = requests.utils.default_headers()
   headers['User-Agent'] = 'Example (example@example.com)'
   client = MailChimp('YOUR SECRET KEY', request_headers=headers)

API Structure
-------------

All endpoints follow the structure listed in the official MailChimp API
v3 documentation. The structure will be listed below and then the
individual methods available after.

::

   MailChimp
   +- Root
   +- Authorized Apps
   +- Automations
   |  +- Actions
   |  +- Emails
   |  |  +- Actions
   |  |  +- Queues
   |  +- Removed Subscribers
   +- Batch Operations
   +- Batch Webhooks
   +- Campaign Folders
   +- Campaigns
   |  +- Actions
   |  +- Content
   |  +- Feedback
   |  +- Send Checklist
   +- Conversations
   |  +- Messages
   +- Customer Journeys
   +- Stores
   |  +- Carts
   |  |  +- Lines
   |  +- Customers
   |  +- Orders
   |  |  +- Lines
   |  +- Products
   |     +- Images
   |     +- Variants
   |  +- Promo Rules
   |     +- Promo Codes
   +- File Manager Files
   +- File Manager Folders
   +- Landing Pages
   |  +- Actions
   |  +- Content
   +- Lists
   |  +- Abuse Reports
   |  +- Activity
   |  +- Clients
   |  +- Growth History
   |  +- Interest Categories
   |  |  +- Interests
   |  +- Members
   |  |  +- Activity
   |  |  +- Events
   |  |  +- Goals
   |  |  +- Notes
   |  |  +- Tags
   |  +- Merge Fields
   |  +- Segments
   |  |  +- Segment Members
   |  +- Signup Forms
   |  +- Twitter Lead Generation Carts
   |  +- Webhooks
   +- Ping
   +- Reports
   |  +- Campaign Abuse
   |  +- Campaign Advice
   |  +- Campaign Open reports
   |  +- Click Reports
   |  |  +- Members
   |  +- Domain Performance
   |  +- EepURL Reports
   |  +- Email Activity
   |  +- Google Analytics
   |  +- Location
   |  +- Sent To
   |  +- Sub-Reports
   |  +- Unsubscribes
   +- Search Campaigns
   +- Search Members
   +- Template Folders
   +- Templates
      +- Default Content

API Endpoints
-------------

Below is the list of all endpoints and the methods that can be called
against them. Any endpoint that has a method that takes an ID argument
(for example the app_id in the authorized_apps endpoint or the
subscriber_hash in the list members endpoints) will record all IDs
passed as well as those generated by methods that will only ever return
a single result such as the create() method present on some endpoints.
These stored attributes are only available at the level that they were
passed or created at and must be passed again to interact with a lower
or higher level such as accessing a list and then a member. The below
code assumes that you have initialized the MailChimp class as listed
above with the name ``client``.

Root
~~~~

.. _root-1:

Root
^^^^

::

   client.root.get()

Authorized Apps
~~~~~~~~~~~~~~~

.. _authorized-apps-1:

Authorized Apps
^^^^^^^^^^^^^^^

::

   client.authorized_apps.create(data={})
   client.authorized_apps.all(get_all=False)
   client.authorized_apps.get(app_id='')

Automations
~~~~~~~~~~~

.. _automations-1:

Automations
^^^^^^^^^^^

::

   client.automations.all(get_all=False)
   client.automations.get(workflow_id='')

Automation Actions
^^^^^^^^^^^^^^^^^^

::

   client.automations.actions.pause(workflow_id='')
   client.automations.actions.start(workflow_id='')

Automation Emails
^^^^^^^^^^^^^^^^^

::

   client.automations.emails.all(workflow_id='')
   client.automations.emails.get(workflow_id='', email_id='')

Automation Email Actions
^^^^^^^^^^^^^^^^^^^^^^^^

::

   client.automations.emails.actions.pause(workflow_id='', email_id='')
   client.automations.emails.actions.start(workflow_id='', email_id='')

Automation Email Queues
^^^^^^^^^^^^^^^^^^^^^^^

::

   client.automations.emails.queues.create(workflow_id='', email_id='', data={})
   client.automations.emails.queues.all(workflow_id='', email_id='')
   client.automations.emails.queues.get(workflow_id='', email_id='', subscriber_hash='')

Automation Removed Subscribers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

   client.automations.removed_subscribers.create(workflow_id='', data={})
   client.automations.removed_subscribers.all(workflow_id='')

Batch Operations
~~~~~~~~~~~~~~~~

.. _batch-operations-1:

Batch Operations
^^^^^^^^^^^^^^^^

::

   client.batch_operations.create(data={})
   client.batch_operations.all(get_all=False)
   client.batch_operations.get(batch_id='')
   client.batch_operations.delete(batch_id='')

Batch Webhooks
~~~~~~~~~~~~~~

.. _batch-webhooks-1:

Batch Webhooks
^^^^^^^^^^^^^^

::

   client.batch_webhooks.create(data={})
   client.batch_webhooks.all(get_all=False)
   client.batch_webhooks.get(batch_webhook_id='')
   client.batch_webhooks.update(batch_webhook_id='', data={})
   client.batch_webhooks.delete(batch_webhook_id='')

Campaigns
~~~~~~~~~

Folders
^^^^^^^

::

   client.campaign_folders.create(data={})
   client.campaign_folders.all(get_all=False)
   client.campaign_folders.get(folder_id='')
   client.campaign_folders.update(folder_id='', data={})
   client.campaign_folders.delete(folder_id='')

.. _campaigns-1:

Campaigns
^^^^^^^^^

::

   client.campaigns.create(data={})
   client.campaigns.all(get_all=False)
   client.campaigns.get(campaign_id='')
   client.campaigns.update(campaign_id='')
   client.campaigns.delete(campaign_id='')

Campaign Actions
^^^^^^^^^^^^^^^^

::

   client.campaigns.actions.cancel(campaign_id='')
   client.campaigns.actions.pause(campaign_id='')
   client.campaigns.actions.replicate(campaign_id='')
   client.campaigns.actions.resume(campaign_id='')
   client.campaigns.actions.schedule(campaign_id='', data={})
   client.campaigns.actions.send(campaign_id='')
   client.campaigns.actions.resend(campaign_id='')
   client.campaigns.actions.test(campaign_id='', data={})
   client.campaigns.actions.unschedule(campaign_id='')

Campaign Content
^^^^^^^^^^^^^^^^

::

   client.campaigns.content.get(campaign_id='')
   client.campaigns.content.update(campaign_id='', data={})

Campaign Feedback
^^^^^^^^^^^^^^^^^

::

   client.campaigns.feedback.create(campaign_id='', data={})
   client.campaigns.feedback.all(campaign_id='', get_all=False)
   client.campaigns.feedback.get(campaign_id='', feedback_id='')
   client.campaigns.feedback.update(campaign_id='', feedback_id='', data={})
   client.campaigns.feedback.delete(campaign_id='', feedback_id='')

Campaign Send Checklist
^^^^^^^^^^^^^^^^^^^^^^^

::

   client.campaigns.send_checklist.get(campaign_id='')

Conversations
~~~~~~~~~~~~~

.. _conversations-1:

Conversations
^^^^^^^^^^^^^

::

   client.conversations.all(get_all=False)
   client.conversations.get(conversation_id='')

Conversation Messages
^^^^^^^^^^^^^^^^^^^^^

::

   client.conversations.messages.create(conversation_id='', data={})
   client.conversations.messages.all(conversation_id='')
   client.conversations.messages.get(conversation_id='', message_id='')

Customer Journeys
~~~~~~~~~~~~~~~~~

.. _customer-journeys-1:

Customer Journeys
^^^^^^^^^^^^^^^^^

::

   client.customer_journeys.trigger(journey_id='', step_id='', data={})

E-Commerce
~~~~~~~~~~

Stores
^^^^^^

::

   client.stores.create(data={})
   client.stores.all(get_all=False)
   client.stores.get(store_id='')
   client.stores.update(store_id='', data={})
   client.stores.delete(store_id='')

Store Carts
^^^^^^^^^^^

::

   client.stores.carts.create(store_id='', data={})
   client.stores.carts.all(store_id='', get_all=False)
   client.stores.carts.get(store_id='', cart_id='')
   client.stores.carts.update(store_id='', cart_id='', data={})
   client.stores.carts.delete(store_id='', cart_id='')

Store Cart Lines
^^^^^^^^^^^^^^^^

::

   client.stores.carts.lines.create(store_id='', cart_id='', data={})
   client.stores.carts.lines.all(store_id='', cart_id='', get_all=False)
   client.stores.carts.lines.get(store_id='', cart_id='', line_id='')
   client.stores.carts.lines.update(store_id='', cart_id='', line_id='', data={})
   client.stores.carts.lines.delete(store_id='', cart_id='', line_id='')

Store Customers
^^^^^^^^^^^^^^^

::

   client.stores.customers.create(store_id='', data={})
   client.stores.customers.all(store_id='', get_all=False)
   client.stores.customers.get(store_id='', customer_id='')
   client.stores.customers.update(store_id='', customer_id='', data={})
   client.stores.customers.create_or_update(store_id='', customer_id='', data={})
   client.stores.customers.delete(store_id='', customer_id='')

Store Orders
^^^^^^^^^^^^

::

   client.stores.orders.create(store_id='', data={})
   client.stores.orders.all(store_id='', get_all=False)
   client.stores.orders.get(store_id='', order_id='')
   client.stores.orders.update(store_id='', order_id='', data={})
   client.stores.orders.delete(store_id='', order_id='')

Store Order Lines
^^^^^^^^^^^^^^^^^

::

   client.stores.orders.lines.create(store_id='', order_id='', data={})
   client.stores.orders.lines.all(store_id='', order_id='', get_all=False)
   client.stores.orders.lines.get(store_id='', order_id='', line_id='')
   client.stores.orders.lines.update(store_id='', order_id='', line_id='', data={})
   client.stores.orders.lines.delete(store_id='', order_id='', line_id='')

Store Products
^^^^^^^^^^^^^^

::

   client.stores.products.create(store_id='', data={})
   client.stores.products.all(store_id='', get_all=False)
   client.stores.products.get(store_id='', product_id='')
   client.stores.products.update(store_id='', product_id='')
   client.stores.products.delete(store_id='', product_id='')

Store Product Images
^^^^^^^^^^^^^^^^^^^^

::

   client.stores.products.images.create(store_id='', product_id='', data={})
   client.stores.products.images.all(store_id='', product_id='', get_all=False)
   client.stores.products.images.get(store_id='', product_id='', image_id='')
   client.stores.products.images.update(store_id='', product_id='', image_id='', data={})
   client.stores.products.images.delete(store_id='', product_id='', image_id='')

Store Product Variants
^^^^^^^^^^^^^^^^^^^^^^

::

   client.stores.products.variants.create(store_id='', product_id='', data={})
   client.stores.products.variants.all(store_id='', product_id='', get_all=False)
   client.stores.products.variants.get(store_id='', product_id='', variant_id='')
   client.stores.products.variants.update(store_id='', product_id='', variant_id='', data={})
   client.stores.products.variants.create_or_update(store_id='', product_id='', variant_id='', data={})
   client.stores.products.variants.delete(store_id='', product_id='', variant_id='')

File Manager
~~~~~~~~~~~~

Files
^^^^^

::

   client.files.create(data={})
   client.files.all(get_all=False)
   client.files.get(file_id='')
   client.files.update(file_id='', data={})
   client.files.delete(file_id='')

.. _folders-1:

Folders
^^^^^^^

::

   client.folders.create(data={})
   client.folders.all(get_all=False)
   client.folders.get(folder_id='')
   client.folders.update(folder_id='', data={})
   client.folders.delete(folder_id='')

Landing Pages
~~~~~~~~~~~~~

.. _landing-pages-1:

Landing Pages
^^^^^^^^^^^^^

::

   client.landing_pages.create(data={})
   client.landing_pages.all()
   client.landing_pages.all(fields='')
   client.landing_pages.get(page_id='')
   client.landing_pages.update(page_id='', data={})
   client.landing_pages.delete(page_id='')

Landing Pages Actions
^^^^^^^^^^^^^^^^^^^^^

::

   client.landing_pages.actions.publish(page_id='')
   client.landing_pages.actions.unpublish(page_id='')

Landing Pages Content
^^^^^^^^^^^^^^^^^^^^^

::

   client.landing_pages.content.get(page_id='')

Lists
~~~~~

.. _lists-1:

Lists
^^^^^

::

   client.lists.create(data={})
   client.lists.update_members(list_id='', data={})
   client.lists.all(get_all=False)
   client.lists.get(list_id='')
   client.lists.update(list_id='', data={})
   client.lists.delete(list_id='')

List Abuse Reports
^^^^^^^^^^^^^^^^^^

::

   client.lists.abuse_reports.all(list_id='', get_all=False)
   client.lists.abuse_reports.get(list_id='', report_id='')

List Activity
^^^^^^^^^^^^^

::

   client.lists.activity.all(list_id='', subscriber_hash='')
   client.lists.activity.feed(list_id='', subscriber_hash='')

List Clients
^^^^^^^^^^^^

::

   client.lists.clients.all(list_id='')

List Growth History
^^^^^^^^^^^^^^^^^^^

::

   client.lists.growth_history.all(list_id='', get_all=False)
   client.lists.growth_history.get(list_id='', month='')

List Interest Categories
^^^^^^^^^^^^^^^^^^^^^^^^

::

   client.lists.interest_categories.create(list_id='', data={})
   client.lists.interest_categories.all(list_id='', get_all=False)
   client.lists.interest_categories.get(list_id='', category_id='')
   client.lists.interest_categories.update(list_id='', category_id='', data={})
   client.lists.interest_categories.delete(list_id='', category_id='')

List Interest Category Interests
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

   client.lists.interest_categories.interests.create(list_id='', category_id='', data={})
   client.lists.interest_categories.interests.all(list_id='', category_id='', get_all=False)
   client.lists.interest_categories.interests.get(list_id='', category_id='', interest_id='')
   client.lists.interest_categories.interests.update(list_id='', category_id='', interest_id='', data={})
   client.lists.interest_categories.interests.delete(list_id='', category_id='', interest_id='')

List Members
^^^^^^^^^^^^

::

   client.lists.members.create(list_id='', data={})
   client.lists.members.all(list_id='', get_all=False)
   client.lists.members.get(list_id='', subscriber_hash='')
   client.lists.members.update(list_id='', subscriber_hash='', data={})
   client.lists.members.create_or_update(list_id='', subscriber_hash='', data={})
   client.lists.members.delete(list_id='', subscriber_hash='')
   client.lists.members.delete_permanent(list_id='', subscriber_hash='')

List Member Activity
^^^^^^^^^^^^^^^^^^^^

::

   client.lists.members.activity.all(list_id='', subscriber_hash='')

List Member Events
^^^^^^^^^^^^^^^^^^

::

   client.lists.members.events.create(list_id='', subscriber_hash='', data={})
   client.lists.members.events.all(list_id='', subscriber_hash='', get_all=False)

List Member Goals
^^^^^^^^^^^^^^^^^

::

   client.lists.members.goals.all(list_id='', subscriber_hash='')

List Member Notes
^^^^^^^^^^^^^^^^^

::

   client.lists.members.notes.create(list_id='', subscriber_hash='', data={})
   client.lists.members.notes.all(list_id='', subscriber_hash='', get_all=False)
   client.lists.members.notes.get(list_id='', subscriber_hash='', note_id='')
   client.lists.members.notes.update(list_id='', subscriber_hash='', note_id='', data={})
   client.lists.members.notes.delete(list_id='', subscriber_hash='', note_id='')

List Member Tags
^^^^^^^^^^^^^^^^

::

   client.lists.members.tags.update(list_id='', subscriber_hash='', data={})
   client.lists.members.tags.all(list_id='', subscriber_hash='')

List Merge Fields
^^^^^^^^^^^^^^^^^

::

   client.lists.merge_fields.create(list_id='', data={})
   client.lists.merge_fields.all(list_id='', get_all=False)
   client.lists.merge_fields.get(list_id='', merge_id='')
   client.lists.merge_fields.update(list_id='', merge_id='', data={})
   client.lists.merge_fields.delete(list_id='', merge_id='')

List Segments
^^^^^^^^^^^^^

::

   client.lists.segments.create(list_id='', data={})
   client.lists.segments.all(list_id='', get_all=False)
   client.lists.segments.get(list_id='', segment_id='')
   client.lists.segments.update(list_id='', segment_id='', data={})
   client.lists.segments.update_members(list_id='', segment_id='', data={})
   client.lists.segments.delete(list_id='', segment_id='')

List Segment Members
^^^^^^^^^^^^^^^^^^^^

::

   client.lists.segments.members.create(list_id='', segment_id='', data={})
   client.lists.segments.members.all(list_id='', segment_id='', get_all=False)
   client.lists.segments.members.delete(list_id='', segment_id='', subscriber_hash='')

List Signup Forms
^^^^^^^^^^^^^^^^^

::

   client.lists.signup_forms.create(list_id='', data={})
   client.lists.signup_forms.all(list_id='')

List Webhooks
^^^^^^^^^^^^^

::

   client.lists.webhooks.create(list_id='', data={})
   client.lists.webhooks.all(list_id='')
   client.lists.webhooks.get(list_id='', webhook_id='')
   client.lists.webhooks.update(list_id='', webhook_id='', data={})
   client.lists.webhooks.delete(list_id='', webhook_id='')

Reports
~~~~~~~

.. _reports-1:

Reports
^^^^^^^

::

   client.reports.all(get_all=False)
   client.reports.get(campaign_id='')

Campaign Abuse Reports
^^^^^^^^^^^^^^^^^^^^^^

::

   client.reports.abuse_reports.all(campaign_id='')
   client.reports.abuse_reports.get(campaign_id='', report_id='')

Campaign Advice
^^^^^^^^^^^^^^^

::

   client.reports.advice.all(campaign_id='')

Click Details Report
^^^^^^^^^^^^^^^^^^^^

::

   client.reports.click_details.all(campaign_id='', get_all=False)
   client.reports.click_details.get(campaign_id='', link_id='')

Click Details Report Members
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

   client.reports.click_details.members.all(campaign_id='', link_id='', get_all=False)
   client.reports.click_details.members.get(campaign_id='', link_id='', subscriber_hash='')

Domain Performance Reports
^^^^^^^^^^^^^^^^^^^^^^^^^^

::

   client.reports.domain_performance.all(campaign_id='')

EepURL Reports
^^^^^^^^^^^^^^

::

   client.reports.eepurl.all(camnpaign_id='')

Email Activity Reports
^^^^^^^^^^^^^^^^^^^^^^

::

   client.reports.email_activity.all(campaign_id='', get_all=False)
   client.reports.email_activity.get(campaign_id='', subscriber_hash='')

Locations Report
^^^^^^^^^^^^^^^^

::

   client.reports.locations.all(campaign_id='', get_all=False)

Sent To Reports
^^^^^^^^^^^^^^^

::

   client.reports.sent_to.all(campaign_id='', get_all=False)
   client.reports.sent_to.get(campaign_id='', subscriber_hash='')

Sub-Reports
^^^^^^^^^^^

::

   client.reports.subreports.all(campaign_id='')

Unsubscribes
^^^^^^^^^^^^

::

   client.reports.unsubscribes.all(campaign_id='', get_all=False)
   client.reports.unsubscribes.get(campaign_id='', subscriber_hash='')

Search
~~~~~~

.. _campaigns-2:

Campaigns
^^^^^^^^^

::

   client.search_campaigns.get()

Members
^^^^^^^

::

   client.search_members.get()

Templates
~~~~~~~~~

.. _folders-2:

Folders
^^^^^^^

::

   client.template_folders.create(data={})
   client.template_folders.all(get_all=False)
   client.template_folders.get(folder_id='')
   client.template_folders.update(folder_id='', data={})
   client.template_folders.delete(folder_id='')

.. _templates-1:

Templates
^^^^^^^^^

::

   client.templates.create(data={})
   client.templates.all(get_all=False)
   client.templates.get(template_id='')
   client.templates.update(template_id='', data={})
   client.templates.delete(template_id='')

Default Content
^^^^^^^^^^^^^^^

::

   client.templates.default_content.all(template_id='')

Logging
-------

The MailChimp client will log request/response detail into the
mailchimp3.client logging namespace. Consider the following snippet to
get started with logging:

.. code:: python

   import logging
   fh = logging.FileHandler('/path/to/some/log.log')
   logger = logging.getLogger('mailchimp3.client')
   logger.addHandler(fh)

   # use the client normally
   client.lists.all(**{'fields': 'lists.date_created'})

request/response detail will be appended into /path/to/some/log.log:

::

   GET Request: https://us15.api.mailchimp.com/3.0/lists?fields=lists.date_created
   GET Response: 200 {"lists":[{"date_created":"2017-05-10T13:53:05+00:00"},{"date_created":"2017-08-22T20:27:56+00:00"},{"date_created":"2017-05-12T21:22:15+00:00"},{"date_created":"2017-04-27T17:42:04+00:00"},{"date_created":"2017-05-10T14:14:49+00:00"},{"date_created":"2017-05-10T13:52:37+00:00"},{"date_created":"2017-05-10T13:51:40+00:00"}]}

Check the `docs <https://docs.python.org/2/library/logging.html>`__ for
more detail on the Python logging package.

Support
-------

If you are having issues, please let us know or submit a pull request.

License
-------

The project is licensed under the MIT License.

.. |mailchimp3 v3.0.21 on PyPi| image:: https://img.shields.io/pypi/v/mailchimp3.svg
   :target: https://pypi.python.org/pypi/mailchimp3
.. |MIT license| image:: https://img.shields.io/badge/licence-MIT-blue.svg
.. |Stable| image:: https://img.shields.io/badge/status-stable-green.svg

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/charlesthk/python-mailchimp",
    "name": "mailchimp3",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "mailchimp api v3 client wrapper",
    "author": "Charles TISSIER",
    "author_email": "charles@vingtcinq.io",
    "download_url": "https://files.pythonhosted.org/packages/08/71/cdef8e888784c5da1186ce82e8d3414dc3d8e47a9fe7b62b483e217591eb/mailchimp3-3.0.21.tar.gz",
    "platform": null,
    "description": "|mailchimp3 v3.0.21 on PyPi| |MIT license| |Stable|\n\npython-mailchimp-api\n====================\n\nA straightforward python client for v3 of MailChimp API using requests\n>= 2.7.0.\n\nGetting Started\n---------------\n\nInstallation\n~~~~~~~~~~~~\n\nThis client is hosted at PyPi under the name ``mailchimp3``, to install\nit, simply run\n\n``pip install mailchimp3``\n\nUpgrading from v2.x\n~~~~~~~~~~~~~~~~~~~\n\nThe order of arguments for initializing the Mailchimp API has been\nreversed starting in 2.1.0 as the username is an optional argument for\nbasic auth. Please reverse the order of your arguments or remove the\nusername argument entirely. The name of the authentication argument has\nalso changed from ``mc_secret`` to ``mc_api``.\n\nUpgrading from v1.x\n~~~~~~~~~~~~~~~~~~~\n\nThe installation procedure for 2.x is the same as before, however there\nare a massive number of changes to the naming conventions within this\nwrapper and the way in which certain methods are called. Please read the\ndocumentation below carefully for information on the new structure and\nexpanded functionality. With this release, all documented endpoints are\nimplemented and all endpoint methods are available.\n\nHistory\n~~~~~~~\n\nUp to date with\n`changelog <http://developer.mailchimp.com/documentation/mailchimp/guides/changelog/>`__\nfeatures listed through 3/03/2017.\n\nInitialization\n~~~~~~~~~~~~~~\n\nGrab ``YOUR_API_KEY`` from your mailchimp account (Account > Extra > Api\nKeys). ``YOUR_USERNAME`` is the one you use to log in on the website and\nis optional.\n\n::\n\n   from mailchimp3 import MailChimp\n\n   client = MailChimp(mc_api='YOUR_API_KEY', mc_user='YOUR_USERNAME')\n\nOAuth Support\n~~~~~~~~~~~~~\n\nIn addition to HTTP Basic Authentication, MailChimp supports\nauthentication through OAuth2. Information on obtaining the proper\naccess key can be found\n`here <http://developer.mailchimp.com/documentation/mailchimp/guides/how-to-use-oauth2/>`__.\n\nPagination\n~~~~~~~~~~\n\nSimply add ``count`` and ``offset`` arguments in your function. The\ncount is how many records to return, the offset is how many records to\nskip. For endpoints that allow the pagination parameters, the all()\nmethod has an additional boolean ``get_all`` argument that will loop\nthrough all records until the API no longer returns any to get all\nrecords without manually performing an additional query. By default,\ncount is 10 and offset is 0 for all endpoints that support it. The\n``get_all`` parameter on the all() method on any endpoint defaults to\nfalse, which follows the values that are provided in the call, and using\n``get_all=True`` will ignore the provided offset to ensure that all\nrecords are returned. When using get_all, the count will be 500 unless\notherwise specified. It is strongly recommended to avoid small values\nfor ``count`` to fetch large numbers of records because this will flood\nthe system. A large ``count`` size should not impact calls which are\nexpected to return a very small number of records, and should improve\nperformance for calls where fetching 500 records would only provide a\nfraction by preventing the delay of making a huge number of requests.\n\n::\n\n   client.lists.members.all('123456', count=100, offset=0)\n\nFields\n~~~~~~\n\nMany endpoints allow you to select which fields will be returned out of\nall available fields (for example, only the email_address of a member).\nSimply add ``fields`` arguments in your function. The following only\ndisplay email_address and id for each member in list 123456:\n\n::\n\n   client.lists.members.all('123456', get_all=True, fields=\"members.email_address,members.id\")\n\nExamples\n~~~~~~~~\n\n::\n\n   # returns all the lists (only name and id)\n   client.lists.all(get_all=True, fields=\"lists.name,lists.id\")\n\n   # returns all members inside list '123456'\n   client.lists.members.all('123456', get_all=True)\n\n   # return the first 100 member's email addresses for the list with id 123456\n   client.lists.members.all('123456', count=100, offset=0, fields=\"members.email_address\")\n\n   # returns the list matching id '123456'\n   client.lists.get('123456')\n\n   # add John Doe with email john.doe@example.com to list matching id '123456'\n   client.lists.members.create('123456', {\n       'email_address': 'john.doe@example.com',\n       'status': 'subscribed',\n       'merge_fields': {\n           'FNAME': 'John',\n           'LNAME': 'Doe',\n       },\n   })\n\n   # returns all the campaigns\n   client.campaigns.all(get_all=True)\n\n   # You can also disable at runtime with the optional ``enabled`` parameter.\n   # Every API call will return None\n   client = MailChimp('YOUR SECRET KEY', enabled=False)\n\n   # You are encouraged to specify a value in seconds for the ``timeout``\n   # parameter to avoid hanging requests.\n   client = MailChimp('YOUR SECRET KEY', timeout=10.0)\n\n   # You are encouraged to specify a User-Agent for requests to the MailChimp\n   # API. Headers can be specified using the ``request_headers`` parameter.\n   headers = requests.utils.default_headers()\n   headers['User-Agent'] = 'Example (example@example.com)'\n   client = MailChimp('YOUR SECRET KEY', request_headers=headers)\n\nAPI Structure\n-------------\n\nAll endpoints follow the structure listed in the official MailChimp API\nv3 documentation. The structure will be listed below and then the\nindividual methods available after.\n\n::\n\n   MailChimp\n   +- Root\n   +- Authorized Apps\n   +- Automations\n   |  +- Actions\n   |  +- Emails\n   |  |  +- Actions\n   |  |  +- Queues\n   |  +- Removed Subscribers\n   +- Batch Operations\n   +- Batch Webhooks\n   +- Campaign Folders\n   +- Campaigns\n   |  +- Actions\n   |  +- Content\n   |  +- Feedback\n   |  +- Send Checklist\n   +- Conversations\n   |  +- Messages\n   +- Customer Journeys\n   +- Stores\n   |  +- Carts\n   |  |  +- Lines\n   |  +- Customers\n   |  +- Orders\n   |  |  +- Lines\n   |  +- Products\n   |     +- Images\n   |     +- Variants\n   |  +- Promo Rules\n   |     +- Promo Codes\n   +- File Manager Files\n   +- File Manager Folders\n   +- Landing Pages\n   |  +- Actions\n   |  +- Content\n   +- Lists\n   |  +- Abuse Reports\n   |  +- Activity\n   |  +- Clients\n   |  +- Growth History\n   |  +- Interest Categories\n   |  |  +- Interests\n   |  +- Members\n   |  |  +- Activity\n   |  |  +- Events\n   |  |  +- Goals\n   |  |  +- Notes\n   |  |  +- Tags\n   |  +- Merge Fields\n   |  +- Segments\n   |  |  +- Segment Members\n   |  +- Signup Forms\n   |  +- Twitter Lead Generation Carts\n   |  +- Webhooks\n   +- Ping\n   +- Reports\n   |  +- Campaign Abuse\n   |  +- Campaign Advice\n   |  +- Campaign Open reports\n   |  +- Click Reports\n   |  |  +- Members\n   |  +- Domain Performance\n   |  +- EepURL Reports\n   |  +- Email Activity\n   |  +- Google Analytics\n   |  +- Location\n   |  +- Sent To\n   |  +- Sub-Reports\n   |  +- Unsubscribes\n   +- Search Campaigns\n   +- Search Members\n   +- Template Folders\n   +- Templates\n      +- Default Content\n\nAPI Endpoints\n-------------\n\nBelow is the list of all endpoints and the methods that can be called\nagainst them. Any endpoint that has a method that takes an ID argument\n(for example the app_id in the authorized_apps endpoint or the\nsubscriber_hash in the list members endpoints) will record all IDs\npassed as well as those generated by methods that will only ever return\na single result such as the create() method present on some endpoints.\nThese stored attributes are only available at the level that they were\npassed or created at and must be passed again to interact with a lower\nor higher level such as accessing a list and then a member. The below\ncode assumes that you have initialized the MailChimp class as listed\nabove with the name ``client``.\n\nRoot\n~~~~\n\n.. _root-1:\n\nRoot\n^^^^\n\n::\n\n   client.root.get()\n\nAuthorized Apps\n~~~~~~~~~~~~~~~\n\n.. _authorized-apps-1:\n\nAuthorized Apps\n^^^^^^^^^^^^^^^\n\n::\n\n   client.authorized_apps.create(data={})\n   client.authorized_apps.all(get_all=False)\n   client.authorized_apps.get(app_id='')\n\nAutomations\n~~~~~~~~~~~\n\n.. _automations-1:\n\nAutomations\n^^^^^^^^^^^\n\n::\n\n   client.automations.all(get_all=False)\n   client.automations.get(workflow_id='')\n\nAutomation Actions\n^^^^^^^^^^^^^^^^^^\n\n::\n\n   client.automations.actions.pause(workflow_id='')\n   client.automations.actions.start(workflow_id='')\n\nAutomation Emails\n^^^^^^^^^^^^^^^^^\n\n::\n\n   client.automations.emails.all(workflow_id='')\n   client.automations.emails.get(workflow_id='', email_id='')\n\nAutomation Email Actions\n^^^^^^^^^^^^^^^^^^^^^^^^\n\n::\n\n   client.automations.emails.actions.pause(workflow_id='', email_id='')\n   client.automations.emails.actions.start(workflow_id='', email_id='')\n\nAutomation Email Queues\n^^^^^^^^^^^^^^^^^^^^^^^\n\n::\n\n   client.automations.emails.queues.create(workflow_id='', email_id='', data={})\n   client.automations.emails.queues.all(workflow_id='', email_id='')\n   client.automations.emails.queues.get(workflow_id='', email_id='', subscriber_hash='')\n\nAutomation Removed Subscribers\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n::\n\n   client.automations.removed_subscribers.create(workflow_id='', data={})\n   client.automations.removed_subscribers.all(workflow_id='')\n\nBatch Operations\n~~~~~~~~~~~~~~~~\n\n.. _batch-operations-1:\n\nBatch Operations\n^^^^^^^^^^^^^^^^\n\n::\n\n   client.batch_operations.create(data={})\n   client.batch_operations.all(get_all=False)\n   client.batch_operations.get(batch_id='')\n   client.batch_operations.delete(batch_id='')\n\nBatch Webhooks\n~~~~~~~~~~~~~~\n\n.. _batch-webhooks-1:\n\nBatch Webhooks\n^^^^^^^^^^^^^^\n\n::\n\n   client.batch_webhooks.create(data={})\n   client.batch_webhooks.all(get_all=False)\n   client.batch_webhooks.get(batch_webhook_id='')\n   client.batch_webhooks.update(batch_webhook_id='', data={})\n   client.batch_webhooks.delete(batch_webhook_id='')\n\nCampaigns\n~~~~~~~~~\n\nFolders\n^^^^^^^\n\n::\n\n   client.campaign_folders.create(data={})\n   client.campaign_folders.all(get_all=False)\n   client.campaign_folders.get(folder_id='')\n   client.campaign_folders.update(folder_id='', data={})\n   client.campaign_folders.delete(folder_id='')\n\n.. _campaigns-1:\n\nCampaigns\n^^^^^^^^^\n\n::\n\n   client.campaigns.create(data={})\n   client.campaigns.all(get_all=False)\n   client.campaigns.get(campaign_id='')\n   client.campaigns.update(campaign_id='')\n   client.campaigns.delete(campaign_id='')\n\nCampaign Actions\n^^^^^^^^^^^^^^^^\n\n::\n\n   client.campaigns.actions.cancel(campaign_id='')\n   client.campaigns.actions.pause(campaign_id='')\n   client.campaigns.actions.replicate(campaign_id='')\n   client.campaigns.actions.resume(campaign_id='')\n   client.campaigns.actions.schedule(campaign_id='', data={})\n   client.campaigns.actions.send(campaign_id='')\n   client.campaigns.actions.resend(campaign_id='')\n   client.campaigns.actions.test(campaign_id='', data={})\n   client.campaigns.actions.unschedule(campaign_id='')\n\nCampaign Content\n^^^^^^^^^^^^^^^^\n\n::\n\n   client.campaigns.content.get(campaign_id='')\n   client.campaigns.content.update(campaign_id='', data={})\n\nCampaign Feedback\n^^^^^^^^^^^^^^^^^\n\n::\n\n   client.campaigns.feedback.create(campaign_id='', data={})\n   client.campaigns.feedback.all(campaign_id='', get_all=False)\n   client.campaigns.feedback.get(campaign_id='', feedback_id='')\n   client.campaigns.feedback.update(campaign_id='', feedback_id='', data={})\n   client.campaigns.feedback.delete(campaign_id='', feedback_id='')\n\nCampaign Send Checklist\n^^^^^^^^^^^^^^^^^^^^^^^\n\n::\n\n   client.campaigns.send_checklist.get(campaign_id='')\n\nConversations\n~~~~~~~~~~~~~\n\n.. _conversations-1:\n\nConversations\n^^^^^^^^^^^^^\n\n::\n\n   client.conversations.all(get_all=False)\n   client.conversations.get(conversation_id='')\n\nConversation Messages\n^^^^^^^^^^^^^^^^^^^^^\n\n::\n\n   client.conversations.messages.create(conversation_id='', data={})\n   client.conversations.messages.all(conversation_id='')\n   client.conversations.messages.get(conversation_id='', message_id='')\n\nCustomer Journeys\n~~~~~~~~~~~~~~~~~\n\n.. _customer-journeys-1:\n\nCustomer Journeys\n^^^^^^^^^^^^^^^^^\n\n::\n\n   client.customer_journeys.trigger(journey_id='', step_id='', data={})\n\nE-Commerce\n~~~~~~~~~~\n\nStores\n^^^^^^\n\n::\n\n   client.stores.create(data={})\n   client.stores.all(get_all=False)\n   client.stores.get(store_id='')\n   client.stores.update(store_id='', data={})\n   client.stores.delete(store_id='')\n\nStore Carts\n^^^^^^^^^^^\n\n::\n\n   client.stores.carts.create(store_id='', data={})\n   client.stores.carts.all(store_id='', get_all=False)\n   client.stores.carts.get(store_id='', cart_id='')\n   client.stores.carts.update(store_id='', cart_id='', data={})\n   client.stores.carts.delete(store_id='', cart_id='')\n\nStore Cart Lines\n^^^^^^^^^^^^^^^^\n\n::\n\n   client.stores.carts.lines.create(store_id='', cart_id='', data={})\n   client.stores.carts.lines.all(store_id='', cart_id='', get_all=False)\n   client.stores.carts.lines.get(store_id='', cart_id='', line_id='')\n   client.stores.carts.lines.update(store_id='', cart_id='', line_id='', data={})\n   client.stores.carts.lines.delete(store_id='', cart_id='', line_id='')\n\nStore Customers\n^^^^^^^^^^^^^^^\n\n::\n\n   client.stores.customers.create(store_id='', data={})\n   client.stores.customers.all(store_id='', get_all=False)\n   client.stores.customers.get(store_id='', customer_id='')\n   client.stores.customers.update(store_id='', customer_id='', data={})\n   client.stores.customers.create_or_update(store_id='', customer_id='', data={})\n   client.stores.customers.delete(store_id='', customer_id='')\n\nStore Orders\n^^^^^^^^^^^^\n\n::\n\n   client.stores.orders.create(store_id='', data={})\n   client.stores.orders.all(store_id='', get_all=False)\n   client.stores.orders.get(store_id='', order_id='')\n   client.stores.orders.update(store_id='', order_id='', data={})\n   client.stores.orders.delete(store_id='', order_id='')\n\nStore Order Lines\n^^^^^^^^^^^^^^^^^\n\n::\n\n   client.stores.orders.lines.create(store_id='', order_id='', data={})\n   client.stores.orders.lines.all(store_id='', order_id='', get_all=False)\n   client.stores.orders.lines.get(store_id='', order_id='', line_id='')\n   client.stores.orders.lines.update(store_id='', order_id='', line_id='', data={})\n   client.stores.orders.lines.delete(store_id='', order_id='', line_id='')\n\nStore Products\n^^^^^^^^^^^^^^\n\n::\n\n   client.stores.products.create(store_id='', data={})\n   client.stores.products.all(store_id='', get_all=False)\n   client.stores.products.get(store_id='', product_id='')\n   client.stores.products.update(store_id='', product_id='')\n   client.stores.products.delete(store_id='', product_id='')\n\nStore Product Images\n^^^^^^^^^^^^^^^^^^^^\n\n::\n\n   client.stores.products.images.create(store_id='', product_id='', data={})\n   client.stores.products.images.all(store_id='', product_id='', get_all=False)\n   client.stores.products.images.get(store_id='', product_id='', image_id='')\n   client.stores.products.images.update(store_id='', product_id='', image_id='', data={})\n   client.stores.products.images.delete(store_id='', product_id='', image_id='')\n\nStore Product Variants\n^^^^^^^^^^^^^^^^^^^^^^\n\n::\n\n   client.stores.products.variants.create(store_id='', product_id='', data={})\n   client.stores.products.variants.all(store_id='', product_id='', get_all=False)\n   client.stores.products.variants.get(store_id='', product_id='', variant_id='')\n   client.stores.products.variants.update(store_id='', product_id='', variant_id='', data={})\n   client.stores.products.variants.create_or_update(store_id='', product_id='', variant_id='', data={})\n   client.stores.products.variants.delete(store_id='', product_id='', variant_id='')\n\nFile Manager\n~~~~~~~~~~~~\n\nFiles\n^^^^^\n\n::\n\n   client.files.create(data={})\n   client.files.all(get_all=False)\n   client.files.get(file_id='')\n   client.files.update(file_id='', data={})\n   client.files.delete(file_id='')\n\n.. _folders-1:\n\nFolders\n^^^^^^^\n\n::\n\n   client.folders.create(data={})\n   client.folders.all(get_all=False)\n   client.folders.get(folder_id='')\n   client.folders.update(folder_id='', data={})\n   client.folders.delete(folder_id='')\n\nLanding Pages\n~~~~~~~~~~~~~\n\n.. _landing-pages-1:\n\nLanding Pages\n^^^^^^^^^^^^^\n\n::\n\n   client.landing_pages.create(data={})\n   client.landing_pages.all()\n   client.landing_pages.all(fields='')\n   client.landing_pages.get(page_id='')\n   client.landing_pages.update(page_id='', data={})\n   client.landing_pages.delete(page_id='')\n\nLanding Pages Actions\n^^^^^^^^^^^^^^^^^^^^^\n\n::\n\n   client.landing_pages.actions.publish(page_id='')\n   client.landing_pages.actions.unpublish(page_id='')\n\nLanding Pages Content\n^^^^^^^^^^^^^^^^^^^^^\n\n::\n\n   client.landing_pages.content.get(page_id='')\n\nLists\n~~~~~\n\n.. _lists-1:\n\nLists\n^^^^^\n\n::\n\n   client.lists.create(data={})\n   client.lists.update_members(list_id='', data={})\n   client.lists.all(get_all=False)\n   client.lists.get(list_id='')\n   client.lists.update(list_id='', data={})\n   client.lists.delete(list_id='')\n\nList Abuse Reports\n^^^^^^^^^^^^^^^^^^\n\n::\n\n   client.lists.abuse_reports.all(list_id='', get_all=False)\n   client.lists.abuse_reports.get(list_id='', report_id='')\n\nList Activity\n^^^^^^^^^^^^^\n\n::\n\n   client.lists.activity.all(list_id='', subscriber_hash='')\n   client.lists.activity.feed(list_id='', subscriber_hash='')\n\nList Clients\n^^^^^^^^^^^^\n\n::\n\n   client.lists.clients.all(list_id='')\n\nList Growth History\n^^^^^^^^^^^^^^^^^^^\n\n::\n\n   client.lists.growth_history.all(list_id='', get_all=False)\n   client.lists.growth_history.get(list_id='', month='')\n\nList Interest Categories\n^^^^^^^^^^^^^^^^^^^^^^^^\n\n::\n\n   client.lists.interest_categories.create(list_id='', data={})\n   client.lists.interest_categories.all(list_id='', get_all=False)\n   client.lists.interest_categories.get(list_id='', category_id='')\n   client.lists.interest_categories.update(list_id='', category_id='', data={})\n   client.lists.interest_categories.delete(list_id='', category_id='')\n\nList Interest Category Interests\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n::\n\n   client.lists.interest_categories.interests.create(list_id='', category_id='', data={})\n   client.lists.interest_categories.interests.all(list_id='', category_id='', get_all=False)\n   client.lists.interest_categories.interests.get(list_id='', category_id='', interest_id='')\n   client.lists.interest_categories.interests.update(list_id='', category_id='', interest_id='', data={})\n   client.lists.interest_categories.interests.delete(list_id='', category_id='', interest_id='')\n\nList Members\n^^^^^^^^^^^^\n\n::\n\n   client.lists.members.create(list_id='', data={})\n   client.lists.members.all(list_id='', get_all=False)\n   client.lists.members.get(list_id='', subscriber_hash='')\n   client.lists.members.update(list_id='', subscriber_hash='', data={})\n   client.lists.members.create_or_update(list_id='', subscriber_hash='', data={})\n   client.lists.members.delete(list_id='', subscriber_hash='')\n   client.lists.members.delete_permanent(list_id='', subscriber_hash='')\n\nList Member Activity\n^^^^^^^^^^^^^^^^^^^^\n\n::\n\n   client.lists.members.activity.all(list_id='', subscriber_hash='')\n\nList Member Events\n^^^^^^^^^^^^^^^^^^\n\n::\n\n   client.lists.members.events.create(list_id='', subscriber_hash='', data={})\n   client.lists.members.events.all(list_id='', subscriber_hash='', get_all=False)\n\nList Member Goals\n^^^^^^^^^^^^^^^^^\n\n::\n\n   client.lists.members.goals.all(list_id='', subscriber_hash='')\n\nList Member Notes\n^^^^^^^^^^^^^^^^^\n\n::\n\n   client.lists.members.notes.create(list_id='', subscriber_hash='', data={})\n   client.lists.members.notes.all(list_id='', subscriber_hash='', get_all=False)\n   client.lists.members.notes.get(list_id='', subscriber_hash='', note_id='')\n   client.lists.members.notes.update(list_id='', subscriber_hash='', note_id='', data={})\n   client.lists.members.notes.delete(list_id='', subscriber_hash='', note_id='')\n\nList Member Tags\n^^^^^^^^^^^^^^^^\n\n::\n\n   client.lists.members.tags.update(list_id='', subscriber_hash='', data={})\n   client.lists.members.tags.all(list_id='', subscriber_hash='')\n\nList Merge Fields\n^^^^^^^^^^^^^^^^^\n\n::\n\n   client.lists.merge_fields.create(list_id='', data={})\n   client.lists.merge_fields.all(list_id='', get_all=False)\n   client.lists.merge_fields.get(list_id='', merge_id='')\n   client.lists.merge_fields.update(list_id='', merge_id='', data={})\n   client.lists.merge_fields.delete(list_id='', merge_id='')\n\nList Segments\n^^^^^^^^^^^^^\n\n::\n\n   client.lists.segments.create(list_id='', data={})\n   client.lists.segments.all(list_id='', get_all=False)\n   client.lists.segments.get(list_id='', segment_id='')\n   client.lists.segments.update(list_id='', segment_id='', data={})\n   client.lists.segments.update_members(list_id='', segment_id='', data={})\n   client.lists.segments.delete(list_id='', segment_id='')\n\nList Segment Members\n^^^^^^^^^^^^^^^^^^^^\n\n::\n\n   client.lists.segments.members.create(list_id='', segment_id='', data={})\n   client.lists.segments.members.all(list_id='', segment_id='', get_all=False)\n   client.lists.segments.members.delete(list_id='', segment_id='', subscriber_hash='')\n\nList Signup Forms\n^^^^^^^^^^^^^^^^^\n\n::\n\n   client.lists.signup_forms.create(list_id='', data={})\n   client.lists.signup_forms.all(list_id='')\n\nList Webhooks\n^^^^^^^^^^^^^\n\n::\n\n   client.lists.webhooks.create(list_id='', data={})\n   client.lists.webhooks.all(list_id='')\n   client.lists.webhooks.get(list_id='', webhook_id='')\n   client.lists.webhooks.update(list_id='', webhook_id='', data={})\n   client.lists.webhooks.delete(list_id='', webhook_id='')\n\nReports\n~~~~~~~\n\n.. _reports-1:\n\nReports\n^^^^^^^\n\n::\n\n   client.reports.all(get_all=False)\n   client.reports.get(campaign_id='')\n\nCampaign Abuse Reports\n^^^^^^^^^^^^^^^^^^^^^^\n\n::\n\n   client.reports.abuse_reports.all(campaign_id='')\n   client.reports.abuse_reports.get(campaign_id='', report_id='')\n\nCampaign Advice\n^^^^^^^^^^^^^^^\n\n::\n\n   client.reports.advice.all(campaign_id='')\n\nClick Details Report\n^^^^^^^^^^^^^^^^^^^^\n\n::\n\n   client.reports.click_details.all(campaign_id='', get_all=False)\n   client.reports.click_details.get(campaign_id='', link_id='')\n\nClick Details Report Members\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n::\n\n   client.reports.click_details.members.all(campaign_id='', link_id='', get_all=False)\n   client.reports.click_details.members.get(campaign_id='', link_id='', subscriber_hash='')\n\nDomain Performance Reports\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n::\n\n   client.reports.domain_performance.all(campaign_id='')\n\nEepURL Reports\n^^^^^^^^^^^^^^\n\n::\n\n   client.reports.eepurl.all(camnpaign_id='')\n\nEmail Activity Reports\n^^^^^^^^^^^^^^^^^^^^^^\n\n::\n\n   client.reports.email_activity.all(campaign_id='', get_all=False)\n   client.reports.email_activity.get(campaign_id='', subscriber_hash='')\n\nLocations Report\n^^^^^^^^^^^^^^^^\n\n::\n\n   client.reports.locations.all(campaign_id='', get_all=False)\n\nSent To Reports\n^^^^^^^^^^^^^^^\n\n::\n\n   client.reports.sent_to.all(campaign_id='', get_all=False)\n   client.reports.sent_to.get(campaign_id='', subscriber_hash='')\n\nSub-Reports\n^^^^^^^^^^^\n\n::\n\n   client.reports.subreports.all(campaign_id='')\n\nUnsubscribes\n^^^^^^^^^^^^\n\n::\n\n   client.reports.unsubscribes.all(campaign_id='', get_all=False)\n   client.reports.unsubscribes.get(campaign_id='', subscriber_hash='')\n\nSearch\n~~~~~~\n\n.. _campaigns-2:\n\nCampaigns\n^^^^^^^^^\n\n::\n\n   client.search_campaigns.get()\n\nMembers\n^^^^^^^\n\n::\n\n   client.search_members.get()\n\nTemplates\n~~~~~~~~~\n\n.. _folders-2:\n\nFolders\n^^^^^^^\n\n::\n\n   client.template_folders.create(data={})\n   client.template_folders.all(get_all=False)\n   client.template_folders.get(folder_id='')\n   client.template_folders.update(folder_id='', data={})\n   client.template_folders.delete(folder_id='')\n\n.. _templates-1:\n\nTemplates\n^^^^^^^^^\n\n::\n\n   client.templates.create(data={})\n   client.templates.all(get_all=False)\n   client.templates.get(template_id='')\n   client.templates.update(template_id='', data={})\n   client.templates.delete(template_id='')\n\nDefault Content\n^^^^^^^^^^^^^^^\n\n::\n\n   client.templates.default_content.all(template_id='')\n\nLogging\n-------\n\nThe MailChimp client will log request/response detail into the\nmailchimp3.client logging namespace. Consider the following snippet to\nget started with logging:\n\n.. code:: python\n\n   import logging\n   fh = logging.FileHandler('/path/to/some/log.log')\n   logger = logging.getLogger('mailchimp3.client')\n   logger.addHandler(fh)\n\n   # use the client normally\n   client.lists.all(**{'fields': 'lists.date_created'})\n\nrequest/response detail will be appended into /path/to/some/log.log:\n\n::\n\n   GET Request: https://us15.api.mailchimp.com/3.0/lists?fields=lists.date_created\n   GET Response: 200 {\"lists\":[{\"date_created\":\"2017-05-10T13:53:05+00:00\"},{\"date_created\":\"2017-08-22T20:27:56+00:00\"},{\"date_created\":\"2017-05-12T21:22:15+00:00\"},{\"date_created\":\"2017-04-27T17:42:04+00:00\"},{\"date_created\":\"2017-05-10T14:14:49+00:00\"},{\"date_created\":\"2017-05-10T13:52:37+00:00\"},{\"date_created\":\"2017-05-10T13:51:40+00:00\"}]}\n\nCheck the `docs <https://docs.python.org/2/library/logging.html>`__ for\nmore detail on the Python logging package.\n\nSupport\n-------\n\nIf you are having issues, please let us know or submit a pull request.\n\nLicense\n-------\n\nThe project is licensed under the MIT License.\n\n.. |mailchimp3 v3.0.21 on PyPi| image:: https://img.shields.io/pypi/v/mailchimp3.svg\n   :target: https://pypi.python.org/pypi/mailchimp3\n.. |MIT license| image:: https://img.shields.io/badge/licence-MIT-blue.svg\n.. |Stable| image:: https://img.shields.io/badge/status-stable-green.svg\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A python client for v3 of MailChimp API",
    "version": "3.0.21",
    "project_urls": {
        "Homepage": "https://github.com/charlesthk/python-mailchimp"
    },
    "split_keywords": [
        "mailchimp",
        "api",
        "v3",
        "client",
        "wrapper"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5ca9772609122afc83ac149bb03ec92e2e91659b3d274e8dbfd0cd02ec5e78f7",
                "md5": "ceb62c7aa6cb4d6d474191e3c6e5d002",
                "sha256": "6eb335fcd915b3233285a0bdf6317fdfc412b4a638c102ae3a7a52019d3f0970"
            },
            "downloads": -1,
            "filename": "mailchimp3-3.0.21-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ceb62c7aa6cb4d6d474191e3c6e5d002",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 95492,
            "upload_time": "2023-06-13T07:12:30",
            "upload_time_iso_8601": "2023-06-13T07:12:30.041356Z",
            "url": "https://files.pythonhosted.org/packages/5c/a9/772609122afc83ac149bb03ec92e2e91659b3d274e8dbfd0cd02ec5e78f7/mailchimp3-3.0.21-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0871cdef8e888784c5da1186ce82e8d3414dc3d8e47a9fe7b62b483e217591eb",
                "md5": "3035ff615e047451dbc81db14e32a91d",
                "sha256": "5e2930ece6144abb659d45e692e92135ab05c9027d3f5e807c0f66cfb374b9ad"
            },
            "downloads": -1,
            "filename": "mailchimp3-3.0.21.tar.gz",
            "has_sig": false,
            "md5_digest": "3035ff615e047451dbc81db14e32a91d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 46050,
            "upload_time": "2023-06-13T07:12:31",
            "upload_time_iso_8601": "2023-06-13T07:12:31.838942Z",
            "url": "https://files.pythonhosted.org/packages/08/71/cdef8e888784c5da1186ce82e8d3414dc3d8e47a9fe7b62b483e217591eb/mailchimp3-3.0.21.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-13 07:12:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "charlesthk",
    "github_project": "python-mailchimp",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "mailchimp3"
}
        
Elapsed time: 0.33920s