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/
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 | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mautic-0.2.0.tar.gz
(8.3 kB
view details)
Built Distribution
mautic-0.2.0-py2-none-any.whl
(19.0 kB
view details)
File details
Details for the file mautic-0.2.0.tar.gz
.
File metadata
- Download URL: mautic-0.2.0.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72910719f03f4909dfe0dbe99ffee00cc0a23e6345babfabeec97a1a3fa71b41 |
|
MD5 | 9a9eb0c9b500fe88a2b6524e92386870 |
|
BLAKE2b-256 | f957830be407f864d0ba88747e9d9c3806ca04180b30afec575b7ec22c23d8a2 |
File details
Details for the file mautic-0.2.0-py2-none-any.whl
.
File metadata
- Download URL: mautic-0.2.0-py2-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | de5fc7aaaa058eeb23d038e2e54e39626c1d7a6169f8f92f0b8e614e916daf04 |
|
MD5 | 282eb2f477011eea9e72f2d6e6212a73 |
|
BLAKE2b-256 | 057f6c45656baeb3b5bc6a2aba186ac8b46ecd5043036edb14d97963be851324 |