<div style="text-align:center"><img alt="logo" src="https://www.zypp.io/static/assets/img/logos/zypp/white/500px.png" width="200"></div>
<br>
[![Downloads](https://pepy.tech/badge/zyppnotify)](https://pepy.tech/project/zyppnotify)
[![PyPI version](https://badge.fury.io/py/zyppnotify.svg)](https://badge.fury.io/py/zyppnotify)
[![Open Source](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://opensource.org/)
Notify
===
> Sending mails and teams messages in a smart way. This project makes it easy to send basic messages through Teams or Email.
# Installation
---
```commandline
pip install zyppnotify
```
## Notify Mail
When using the `NotifyMail` class, the environment variables `EMAIL_USER` (mailadress you want to mail with), `MAIL_TENANT_ID`, `MAIL_CLIENT_ID` and `MAIL_CLIENT_SECRET` (3x App registration credentials with User.Read.All permission with admin consent to authenticate to MS Graph) need to be set.
The initialization of this class will return an error if one of thes variables is not set.
```python
from notify import NotifyMail, NotifyTeams
# versturen van een basis bericht met onderwerp en tekst
mail = NotifyMail(to="reveiver@domain.com",
subject="Notify me!",
message="This is a test message, send through the notify package")
mail.send_email()
```
## Notify Teams
```python
from notify import NotifyTeams
from notify.tests import import_sample_dfs
webhook = ("REPLACE_ME")
teams = NotifyTeams(webhook=webhook)
# versturen van een basis bericht met onderwerp en tekst
teams.basic_message(title="Notify me!",
message="This is a test message, send through the notify package")
# versturen van een uitgebreid rapport over dataframes.
dfs = import_sample_dfs()
teams.basic_message(title="Notify me!",
message="This is optional",
buttons={"button_name": "https://www.my_link.nl"},
dfs=dfs) # creates a report on the dataframes processed.
```
## Notify utils
```python
from notify import format_numbers, dataframe_to_html
from notify.tests import import_sample_dfs
df = import_sample_dfs().get("Transactions")
# format numbers and currencies using dutch locale
df = format_numbers(df, currency_columns=["amount"], number_columns=[])
html_table = dataframe_to_html(df)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/zypp-io/zyppnotify",
"name": "zyppnotify",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "python,notifications,teams,e-mail",
"author": "Zypp",
"author_email": "hello@zypp.io",
"download_url": "https://files.pythonhosted.org/packages/e5/5c/52e1dd232b2ec25cbdd14e9d8cfb66133c77302386e92ecad406a06d4e50/zyppnotify-0.5.1.tar.gz",
"platform": null,
"description": "<div style=\"text-align:center\"><img alt=\"logo\" src=\"https://www.zypp.io/static/assets/img/logos/zypp/white/500px.png\" width=\"200\"></div>\n<br>\n\n[![Downloads](https://pepy.tech/badge/zyppnotify)](https://pepy.tech/project/zyppnotify)\n[![PyPI version](https://badge.fury.io/py/zyppnotify.svg)](https://badge.fury.io/py/zyppnotify)\n[![Open Source](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://opensource.org/)\n\nNotify\n===\n> Sending mails and teams messages in a smart way. This project makes it easy to send basic messages through Teams or Email.\n\n# Installation\n\n---\n\n```commandline\npip install zyppnotify\n```\n\n## Notify Mail\nWhen using the `NotifyMail` class, the environment variables `EMAIL_USER` (mailadress you want to mail with), `MAIL_TENANT_ID`, `MAIL_CLIENT_ID` and `MAIL_CLIENT_SECRET` (3x App registration credentials with User.Read.All permission with admin consent to authenticate to MS Graph) need to be set.\nThe initialization of this class will return an error if one of thes variables is not set.\n\n```python\nfrom notify import NotifyMail, NotifyTeams\n\n# versturen van een basis bericht met onderwerp en tekst\nmail = NotifyMail(to=\"reveiver@domain.com\",\n subject=\"Notify me!\",\n message=\"This is a test message, send through the notify package\")\n\nmail.send_email()\n```\n\n## Notify Teams\n```python\nfrom notify import NotifyTeams\nfrom notify.tests import import_sample_dfs\n\nwebhook = (\"REPLACE_ME\")\n\nteams = NotifyTeams(webhook=webhook)\n\n# versturen van een basis bericht met onderwerp en tekst\nteams.basic_message(title=\"Notify me!\",\n message=\"This is a test message, send through the notify package\")\n\n# versturen van een uitgebreid rapport over dataframes.\ndfs = import_sample_dfs()\nteams.basic_message(title=\"Notify me!\",\n message=\"This is optional\",\n buttons={\"button_name\": \"https://www.my_link.nl\"},\n dfs=dfs) # creates a report on the dataframes processed.\n\n```\n\n## Notify utils\n```python\nfrom notify import format_numbers, dataframe_to_html\nfrom notify.tests import import_sample_dfs\n\ndf = import_sample_dfs().get(\"Transactions\")\n\n# format numbers and currencies using dutch locale\ndf = format_numbers(df, currency_columns=[\"amount\"], number_columns=[])\nhtml_table = dataframe_to_html(df)\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "Send users notifications through various platforms",
"version": "0.5.1",
"project_urls": {
"Bug Tracker": "https://github.com/zypp-io/zyppnotify/issues",
"Homepage": "https://github.com/zypp-io/zyppnotify",
"Source": "https://github.com/zypp-io/zyppnotify"
},
"split_keywords": [
"python",
"notifications",
"teams",
"e-mail"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9f63eb4d1fc44ce59f568c035e4fdf1d4b78a91edb04db969c71cdd847ed2643",
"md5": "3a6995e10984dfe339c791fee6f3a6ab",
"sha256": "43d2a957e76143acc267f7550315f9d594419493e5d65eca8d5045ce7f769536"
},
"downloads": -1,
"filename": "zyppnotify-0.5.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3a6995e10984dfe339c791fee6f3a6ab",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 8698,
"upload_time": "2023-06-12T08:15:10",
"upload_time_iso_8601": "2023-06-12T08:15:10.577313Z",
"url": "https://files.pythonhosted.org/packages/9f/63/eb4d1fc44ce59f568c035e4fdf1d4b78a91edb04db969c71cdd847ed2643/zyppnotify-0.5.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e55c52e1dd232b2ec25cbdd14e9d8cfb66133c77302386e92ecad406a06d4e50",
"md5": "f151de0917caedf8337f0394914b516e",
"sha256": "5b56b0bc7de9d93a3ce4ef3ab683f1396d335937253ea94fde25d964af6565ea"
},
"downloads": -1,
"filename": "zyppnotify-0.5.1.tar.gz",
"has_sig": false,
"md5_digest": "f151de0917caedf8337f0394914b516e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 8452,
"upload_time": "2023-06-12T08:15:12",
"upload_time_iso_8601": "2023-06-12T08:15:12.307149Z",
"url": "https://files.pythonhosted.org/packages/e5/5c/52e1dd232b2ec25cbdd14e9d8cfb66133c77302386e92ecad406a06d4e50/zyppnotify-0.5.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-12 08:15:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "zypp-io",
"github_project": "zyppnotify",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "zyppnotify"
}