Skip to main content

NotifPy is here to send alert, notification and promotion related email and SMS

Project description

NotifPy

Available on https://pypi.org/project/NotifPy/

NotifPy is an all-in-one Python package designed to enable users to effortlessly send email and SMS notifications or alerts to designated email addresses and phone numbers. With NotifPy, integrating robust email and SMS functionalities into applications becomes seamless, facilitating prompt communication with target audiences.

Start Using NotifPy by

pip install NotifPy

To employ email services follow the below steps:

from NotifPy import EmailNotif
sender = EmailNotif.email_notif(sender_address='A@B.com', sender_password='your_email_password', recipient_email='B@C.com')
sender.EmailSender(subject = "It's me! Hi!", body='This is a test')

It is noteworthy, the default email service provider of package is gmail while simply it can be configured to yahoo, outlook/hotmail and the customized mode:

sender.EmailSender(subject = "It's me! Hi!", body='This is a test', email_provider='yahoo')
sender.EmailSender(subject = "It's me! Hi!", body='This is a test', email_provider='outlook')

For customized mode, it can be set based on SMTP server and port of your choice. For instance, for AOL mail:

sender.EmailSender(subject = "It's me! Hi!", body='This is a test', email_provider='', custom_server='smtp.aol.com', custom_port=587)

Furthermore, to use gmail service, due to recent Google policy, you need to first activate 2-step verfication then generate a 16-character app password for your email and use that password here. Google App Password

For SMS Notification, the current package version support Twillio service where based on account credentials the user is authenticated in our package. It should be noted, free trial is available in Twillio. Twillio Link

To utilize SMS service please follow below steps:

from NotifPy import SMSNotif
sender = SMSNotif.SMS_notif(body = "it's me Hi", recipient_phone_number= '+1...')
sender.twillio(account_sid="your account_sid from Twillio", auth_token="your auth_token from Twillio", twilio_phone_number="your number from Twillio")

How to create this package

To create this package, you need to establish a directory of your choice (e.g., NotifPy) where you should place the init.py file and your Python files. It is worth noting that creating a directory like NotifPy.egg_info is unnecessary as it will be generated automatically. The package configuration can be facilitated with the setup.cfg file. You may adjust the version available on this repository to suit your package requirements.

In addition, the pyproject.toml file serves to specify the build backend and the essential build tools for the Python project. For the README.md file, it is important to recognize that this version may differ from the one displayed on pypi.org; therefore, it should be modified accordingly. Lastly, the license holds significance in clarifying the legal aspects of the app. If your package is intended for public accessibility, you can utilize the LICENSE of this package (with minor modifications such as changing the name and date). Alternatively, for more specific cases, you can refer to choosealicense.com.

Once all configurations are set, in this directory, execute the following command:

py -m build

Subsequently, a folder named "dist" will be generated. Ensure that you have active accounts on both test.pypi.org and pypi.org.

It is advisable to begin by testing your package on test.pypi.org to assure its performance before proceeding to upload it on pypi.org. The following steps should be followed for the upload process:

python -m twine upload --repository testpypi dist/*
python -m twine upload --repository pypi dist/*

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

NotifPy-0.0.4.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

NotifPy-0.0.4-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file NotifPy-0.0.4.tar.gz.

File metadata

  • Download URL: NotifPy-0.0.4.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for NotifPy-0.0.4.tar.gz
Algorithm Hash digest
SHA256 12b05d121cd6e7824dbfc8590de86434b9ebcae67cbbeceb7aba3bb2cfa5a4aa
MD5 5a5f07106870d73c37f6f02ec98d0e20
BLAKE2b-256 29816c9027c4a0703b0752afed0e7f0d29735aafcc8a9ad3e60a04815ee07e4e

See more details on using hashes here.

File details

Details for the file NotifPy-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: NotifPy-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for NotifPy-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3b472f457af1055b674a7e0c082dbe688ce08854f19ef5f9d4d726a6584f7dc5
MD5 8801175ae16500aa2a8d51174d6c6378
BLAKE2b-256 1ba64b52a091e56ff75d801d0e9e646f04e3ca8281999678ac46b3c746a50b19

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