Skip to main content

Send users notifications through various platforms

Project description

logo

Downloads PyPI version Open Source

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 (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.

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


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.5.1.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zyppnotify-0.5.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file zyppnotify-0.5.1.tar.gz.

File metadata

  • Download URL: zyppnotify-0.5.1.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for zyppnotify-0.5.1.tar.gz
Algorithm Hash digest
SHA256 5b56b0bc7de9d93a3ce4ef3ab683f1396d335937253ea94fde25d964af6565ea
MD5 f151de0917caedf8337f0394914b516e
BLAKE2b-256 e55c52e1dd232b2ec25cbdd14e9d8cfb66133c77302386e92ecad406a06d4e50

See more details on using hashes here.

File details

Details for the file zyppnotify-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: zyppnotify-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for zyppnotify-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 43d2a957e76143acc267f7550315f9d594419493e5d65eca8d5045ce7f769536
MD5 3a6995e10984dfe339c791fee6f3a6ab
BLAKE2b-256 9f63eb4d1fc44ce59f568c035e4fdf1d4b78a91edb04db969c71cdd847ed2643

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page