Skip to main content

A simple library for sending notifications

Project description

PyNotifyYou

A simple library for sending notifications

Attention! I'm far from the most experienced or smart developer, so I'm not denying that my code can be pretty bad! I will always be glad to receive your advice on improving the code and ideas for implementation.

I also want to say that this is my first library, and most likely I will use quite a lot of old and crooked nonsense. Please don't blame me for this 👻

Navigation

Let's add some convenience for navigating through the repository:

Providers

I plan to implement support for several ways to receive notifications, and I will simply call them providers for convenience. 👌

At the moment, the project supports only one provider: Ntfy.sh

Installing

Okay, let's move on to the installation! In fact, the installation is no different from other libraries

You just need to install the library via pip:

pip install Py-Notify-You

Usage

And here it 's more interesting!

You can see the simplest option for sending notifications below:

To receive notifications, you must install the Ntfy app on your phone!

Then click on the "+" button in the lower right corner to create a topic and get link (It will be needed in the future)

When creating, you will be required to enter the name of the topic, which will be a link, for example:

Now all that remains is to write the code! For the easiest way to send notifications, you can use the code below:

import PyNotifyYou

sender = PyNotifyYou.Ntfy("https://ntfy.sh/YourLink") #  Here you should replace the link with your own
sender.send('Your message!')

DON'T FORGET TO CHANGE THE LINK

You can also add a header for your notification using the method set_title() :

import PyNotifyYou

sender = PyNotifyYou.Ntfy("https://ntfy.sh/YourLink") #  Here you should replace the link with your own
sender.set_title("Your title")
sender.send('Your message!')

More information can be found on the project's wiki here

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

py_notify_you-1.0.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

py_notify_you-1.0.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file py_notify_you-1.0.1.tar.gz.

File metadata

  • Download URL: py_notify_you-1.0.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.7 Windows/10

File hashes

Hashes for py_notify_you-1.0.1.tar.gz
Algorithm Hash digest
SHA256 ac65548d6d648df9034b9006ea1930579aadd3d8538fe4463596a6223cffa833
MD5 38ce72ac1e1b9f5cfd6a64048fd95373
BLAKE2b-256 0852f25ce7c8476221d6193739429c686bfd04cef1b346fd7d7063c5cdc57c05

See more details on using hashes here.

File details

Details for the file py_notify_you-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: py_notify_you-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.7 Windows/10

File hashes

Hashes for py_notify_you-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f37c9ed0608d4c218e615553d92f33c52c8036f547e9965e7d022afa7e0bcfd7
MD5 3cb4959ba38de5f79777841f587b45f9
BLAKE2b-256 5544d22f0ed17abd7c9ad3b1e049138a888e9373e66b72b6de481c3b2ba73bab

See more details on using hashes here.

Supported by

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