Skip to content
This repository has been archived by the owner on Feb 1, 2019. It is now read-only.

divio/python-mautic

Repository files navigation

Mautic Python

Python wrapper for Mautic API based on 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:

>>> 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())

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages