# `moe-inform-client`
## Table of contents
- Overview
- Installation
- Requirements
- Usage
- Troubleshooting and FAQs
- APIs
- Contributing
- License
## Overview
This Python Package helps you in sending notifications through [MoEngage Inform](https://www.moengage.com/blog/introducing-transactional-alerts-moengage-inform/), the smartest way to design & deliver notifications. Deliver your transactional messages to any channel through one API. Currently Email and SMS channels are supported.
For an official overview of Inform Product, please see the [Inform Overview](https://help.moengage.com/hc/en-us/articles/10672957787284-Overview-Inform) or contact us at [MoEngage](https://moengage.com/). Happy engaging your users!
## Installation
Install from PyPI using [pip](http://www.pip-installer.org/en/latest/):
```shell
$ pip install moe-inform-client
```
python3.9 or later is required.
## Requirements
```text
StrEnum~=0.4.9
urllib3~=1.26.5
jsonschema~=4.17.3
```
Note: Install these individually if any issue raises in installation of these requirements like this
```shell
$ pip install StrEnum~=0.4.9
```
## Usage
```python
from informclient import InformClient
"""
base_url = "https://sandbox-inform-api-XX.moengage.com"
app_id = "XXXXXXXXXX"
api_secret = "XXXXXXXXXX"
"""
client = InformClient(base_url, app_id, api_secret)
payload = {
"alert_id": "XXXXXXXXXX",
"user_id": "XXXXXXXXXX",
"transaction_id": "XXXXXXXXXX",
"payloads":
{
"SMS":
{
"recipient":"+91XXXXXXXXXX",
"personalized_attributes": {
"attr": "value"
}
},
"EMAIL":
{
"recipient":"XXXXXXXXXX@example.com",
"personalized_attributes": {
"attr": "value"
}
}
}
}
response = client.send_alert(payload)
print(response)
```
## Troubleshooting and FAQs
- ### What is the format of base_url?
- The base_url should be of the format "https://sandbox-inform-api-XX.moengage.com"
- ### Why do I get **sslcertverificationerror** while sending an alert?
- Inform Client is only supported through secured HTTPS connection requests. If the request throws
**sslcertverificationerror**. Run the following commands.
- For **MacOSx**
```shell
$ pip install certifi
$ /Applications/Python\ 3.9/Install\ Certificates.command
```
- For **Windows**
```shell
$ pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org informclient
```
## APIs
For a full description of request and response payloads and properties, please see the [Official Inform API docs](https://developers.moengage.com/hc/en-us/articles/10699624590868).
- `send_alert(requestbody) (response, Error)` [[See alert Description ]](https://help.moengage.com/hc/en-us/articles/10717041310484-Test-Alert#attributes-0-5)
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/moengage/inform-client-python. See [CONTRIBUTING.md](CONTRIBUTING.md) for more info.
## License
This package is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
MIT LICENSE
Copyright 2023 MOENGAGE
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Raw data
{
"_id": null,
"home_page": "https://github.com/moengage/inform-client-python",
"name": "moe-inform-client",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "",
"keywords": "MoEngage,Inform,MoEngage Inform,Customer Engagement,Transactional Alerts",
"author": "MoEngage",
"author_email": "inform@moengage.com",
"download_url": "https://files.pythonhosted.org/packages/36/a5/43e2b98972a39fc0fe11735b0380c6c82458a70b367683405fb9d0cf43a8/moe-inform-client-0.0.2.tar.gz",
"platform": null,
"description": "# `moe-inform-client`\n\n## Table of contents\n\n- Overview\n- Installation\n- Requirements\n- Usage\n- Troubleshooting and FAQs\n- APIs\n- Contributing\n- License\n\n## Overview\n\nThis Python Package helps you in sending notifications through [MoEngage Inform](https://www.moengage.com/blog/introducing-transactional-alerts-moengage-inform/), the smartest way to design & deliver notifications. Deliver your transactional messages to any channel through one API. Currently Email and SMS channels are supported.\nFor an official overview of Inform Product, please see the [Inform Overview](https://help.moengage.com/hc/en-us/articles/10672957787284-Overview-Inform) or contact us at [MoEngage](https://moengage.com/). Happy engaging your users!\n\n## Installation\nInstall from PyPI using [pip](http://www.pip-installer.org/en/latest/):\n\n```shell\n$ pip install moe-inform-client\n```\n\npython3.9 or later is required.\n\n## Requirements\n```text\n StrEnum~=0.4.9\n urllib3~=1.26.5\n jsonschema~=4.17.3\n```\nNote: Install these individually if any issue raises in installation of these requirements like this \n```shell\n$ pip install StrEnum~=0.4.9\n```\n\n## Usage\n\n```python\nfrom informclient import InformClient\n\"\"\"\nbase_url = \"https://sandbox-inform-api-XX.moengage.com\"\napp_id = \"XXXXXXXXXX\"\napi_secret = \"XXXXXXXXXX\"\n\"\"\"\nclient = InformClient(base_url, app_id, api_secret)\npayload = {\n \"alert_id\": \"XXXXXXXXXX\",\n \"user_id\": \"XXXXXXXXXX\",\n \"transaction_id\": \"XXXXXXXXXX\",\n \"payloads\": \n {\n \"SMS\": \n {\n \"recipient\":\"+91XXXXXXXXXX\",\n \"personalized_attributes\": {\n \"attr\": \"value\"\n }\n },\n \"EMAIL\":\n {\n \"recipient\":\"XXXXXXXXXX@example.com\",\n \"personalized_attributes\": {\n \"attr\": \"value\"\n }\n }\n }\n}\nresponse = client.send_alert(payload)\nprint(response)\n```\n\n## Troubleshooting and FAQs\n- ### What is the format of base_url?\n - The base_url should be of the format \"https://sandbox-inform-api-XX.moengage.com\"\n \n- ### Why do I get **sslcertverificationerror** while sending an alert? \n - Inform Client is only supported through secured HTTPS connection requests. If the request throws\n **sslcertverificationerror**. Run the following commands.\n - For **MacOSx**\n ```shell\n $ pip install certifi\n $ /Applications/Python\\ 3.9/Install\\ Certificates.command\n ```\n - For **Windows**\n ```shell\n $ pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org informclient\n ```\n \n\n## APIs\n\nFor a full description of request and response payloads and properties, please see the [Official Inform API docs](https://developers.moengage.com/hc/en-us/articles/10699624590868).\n\n- `send_alert(requestbody) (response, Error)` [[See alert Description ]](https://help.moengage.com/hc/en-us/articles/10717041310484-Test-Alert#attributes-0-5)\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/moengage/inform-client-python. See [CONTRIBUTING.md](CONTRIBUTING.md) for more info.\n\n## License\n\nThis package is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\nMIT LICENSE\n\nCopyright 2023 MOENGAGE\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
"bugtrack_url": null,
"license": "",
"summary": "This Python Package helps you in sending notifications through MoEngage Inform",
"version": "0.0.2",
"project_urls": {
"Bug Tracker": "https://github.com/moengage/inform-client-python/issues",
"Homepage": "https://github.com/moengage/inform-client-python"
},
"split_keywords": [
"moengage",
"inform",
"moengage inform",
"customer engagement",
"transactional alerts"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "89bc6d08b2501d7632589f6fb9ff14662e60e1ba28ccc7defb0fbfaa8437a146",
"md5": "42d29398da2c5ad146920e7ff112c90b",
"sha256": "eb54d86cae2855b43b3d1cb5b7236954982e2922041f91fb34343bda865ca666"
},
"downloads": -1,
"filename": "moe_inform_client-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "42d29398da2c5ad146920e7ff112c90b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 6713,
"upload_time": "2023-05-17T08:38:33",
"upload_time_iso_8601": "2023-05-17T08:38:33.565542Z",
"url": "https://files.pythonhosted.org/packages/89/bc/6d08b2501d7632589f6fb9ff14662e60e1ba28ccc7defb0fbfaa8437a146/moe_inform_client-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "36a543e2b98972a39fc0fe11735b0380c6c82458a70b367683405fb9d0cf43a8",
"md5": "9837fb917571517f16769f68624dcef9",
"sha256": "b16fe2c47c5b70be57e4ee1234d33c9968322aafc5f669ce6c3f0bc6c377f93e"
},
"downloads": -1,
"filename": "moe-inform-client-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "9837fb917571517f16769f68624dcef9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 5927,
"upload_time": "2023-05-17T08:38:35",
"upload_time_iso_8601": "2023-05-17T08:38:35.708252Z",
"url": "https://files.pythonhosted.org/packages/36/a5/43e2b98972a39fc0fe11735b0380c6c82458a70b367683405fb9d0cf43a8/moe-inform-client-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-17 08:38:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "moengage",
"github_project": "inform-client-python",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "StrEnum",
"specs": [
[
"~=",
"0.4.9"
]
]
},
{
"name": "urllib3",
"specs": [
[
"~=",
"1.26.5"
]
]
},
{
"name": "jsonschema",
"specs": [
[
"~=",
"4.17.3"
]
]
}
],
"lcname": "moe-inform-client"
}