Skip to main content
===============================
Mautic Python
===============================

Python wrapper for Mautic API based on `requests-oauthlib <https://github.com/requests/requests-oauthlib>`_

Installation
------------

Clone repo from GitHub_::

$ git clone https://github.com/divio/python-mautic.git

Then install it by running::

$ python setup.py install


Quickstart
----------
Put your Mautic API credentials in `apitester/oauth2_app.py`
Run Flask app to get OAuth2 token::

$ python apitester/oauth2_app.py

This way you'll have `creds.json` in temporary directory. Now you can start using Mautic API:

.. code-block:: python

>>> from python_mautic import MauticOauth2Client, Contacts
>>> from python_mautic.utils import read_token_tempfile
>>> token = read_token_tempfile()
>>> mautic = MauticOauth2Client(base_url='<base URL>', client_id='<Mautic Public Key>', token=token)
>>> contacts = Contacts(client=mautic)
>>> print(contacts.get_list())


=======
History
=======


0.2.0 (2016-12-23)
------------------

* Basic Auth client for Mautic 2.3
* Improved exception handling


0.1.0 (2016-12-07)
------------------

* Initial port of https://github.com/mautic/api-library/

Release files for mautic 0.2.0

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

Source distribution (sdist)

Source distribution for mautic 0.2.0
File Size Uploaded
mautic-0.2.0.tar.gz 8.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mautic 0.2.0
File Interpreter ABI Platform
mautic-0.2.0-py2-none-any.whl Python 2 none any Details

Total release size: 27.2 kB

Release files / mautic-0.2.0.tar.gz

Download URL mautic-0.2.0.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
72910719f03f4909dfe0dbe99ffee00cc0a23e6345babfabeec97a1a3fa71b41
BLAKE2b-256 checksum
How to use checksums
f957830be407f864d0ba88747e9d9c3806ca04180b30afec575b7ec22c23d8a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mautic-0.2.0-py2-none-any.whl

Download URL mautic-0.2.0-py2-none-any.whl
Size 19.0 kB
Tags Python 2
SHA-256 checksum
How to use checksums
de5fc7aaaa058eeb23d038e2e54e39626c1d7a6169f8f92f0b8e614e916daf04
BLAKE2b-256 checksum
How to use checksums
057f6c45656baeb3b5bc6a2aba186ac8b46ecd5043036edb14d97963be851324
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

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