Wrapper library for calling Moengage APIs in python
Project description
Moengage
A wrapper library for calling Moengage APIs in python
Installation
pip install moengage
Getting Started
from moengage import Moengage
mo = Moengage(<BASE_URL>, <APP_ID>, <API_KEY>)
Points to Note:
BASE_URLis the Moengage DATA API endpoint base url. eg: "https://api-03.moengage.com"APP_IDfor your MoEngage account is available on the MoEngage Dashboard in Settings > App Settings > Account Settings > APP ID.API_KEYis the api_key generated by navigating to Settings > APIs > DATA API Settings. Please refer to MoEngage documentation for further details regarding these.
Creating or updating user profile
mo.create_or_update_user(<USER_ID>, <USER_NAME>, <USER_PHONE>, <USER_EMAIL>, **kwargs)
Points to Note:
USER_IDis mandatory. It is a unique identifier for a user provided by the client that will be used for updating user profile and firing events for the user.USER_NAME,USER_PHONEandUSER_EMAILare optional parameters that will be set as user standard attributes if provided.- Custom user attributes can be set by passing the attribute name and value in keyword arguments.
Publishing event for a user
mo.publish_event(<USER_ID>, <EVENT_NAME>, **kwargs)
Points to Note:
USER_IDis mandatory. It is the unique identifier of the user for which the event is to be tracked.EVENT_NAMEis mandatory. The event will be tracked in MoEngage with this name.- Custom event attributes can be set by passing the attribute name and value in keyword arguments.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
moengage-0.3.4.tar.gz
(3.1 kB
view details)
File details
Details for the file moengage-0.3.4.tar.gz.
File metadata
- Download URL: moengage-0.3.4.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25342193f5aa3059d10be7b1fc4182d061e607255b9345104e1141cdf83c96d0
|
|
| MD5 |
08a96e06052a4d15a77b1a71c52b396e
|
|
| BLAKE2b-256 |
bd432977960325ec3230ef9993d525847702ab131b01de14639b17b7e8bf7f57
|