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.

Since the example uses Ntfy you need to perform the following steps:

To receive notifications, you must install the Ntfy app on your phone(Android,IOS) or install PWA!

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 py_notify_you

sender = py_notify_you.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 py_notify_you

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

More information can be found on the project's wiki

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

Uploaded Source

Built Distribution

py_notify_you-1.0.5-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: py_notify_you-1.0.5.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.11 Windows/10

File hashes

Hashes for py_notify_you-1.0.5.tar.gz
Algorithm Hash digest
SHA256 8e79fdf1080e8ac94370aa91c27313e5ce5dbe5f9116e7b0b78bea64633414df
MD5 c11f273b06990f2264ac4cb47b3b7bbb
BLAKE2b-256 0d05d443310e04b2020638e4d7da241b4e33cb36bdeb7c8ae90d5657235e4c62

See more details on using hashes here.

File details

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

File metadata

  • Download URL: py_notify_you-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.11 Windows/10

File hashes

Hashes for py_notify_you-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1c279c2e97bf40c2e59c667e43acc46c521e5fc17b7bdd1b99bf1046858714da
MD5 5cebdb48c0af6bc166348a7e71993f5d
BLAKE2b-256 4bfd8ff5246a2a25cb0152adcc2570cc6f708b70fef3533f24e61c4558425867

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