Send users notifications through various platforms
Project description
Notify
Sending mails and teams messages in a smart way. This project makes it easy to send basic messages through Teams or Email.
Installation
pip install zyppnotify
Notify Mail
When using the NotifyMail
class, the environment variables EMAIL_USER
and EMAIL_PW
need to be set.
The initialization of this class will return an error if one of thes variables is not set.
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
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
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)
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
zyppnotify-0.2.1.tar.gz
(8.0 kB
view hashes)
Built Distribution
Close
Hashes for zyppnotify-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 390f78f9e2a18d3589cb6ef496be9dc20a905a77c25cf2d2cc2a71001b0c7461 |
|
MD5 | 7c2f0660dcdbc8bcfdb6b3a3bf24d72d |
|
BLAKE2b-256 | 89c0d0e450ef7de706caf2abff2409b5bde9b31da98b3d08372305d5cdb96bb0 |