Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Python wrapper for Mautic API

Project description

===============================
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/

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mautic, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size mautic-0.2.0-py2-none-any.whl (19.0 kB) File type Wheel Python version 2.7 Upload date Hashes View hashes
Filename, size mautic-0.2.0.tar.gz (8.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page