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

Uploaded Source

Built Distribution

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

py_notify_you-2.0.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for py_notify_you-2.0.1.tar.gz
Algorithm Hash digest
SHA256 5606f05100c553255e609f7228ed8610309e8483fad6ef904465a612efd14401
MD5 8b071cc7f79ed917b1af57267f48930a
BLAKE2b-256 e385fde7d524b2fa17579b00ab4126b2171d243f099d3e8b1139cfd72b94b543

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for py_notify_you-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d5afea5a45567765ed018806e7ffde18c097df2209242cf0d134e3a9b6f82a15
MD5 53b2ea7662eab9cb988cd34fd04b35f6
BLAKE2b-256 037b48d08d395c9262c448e496ba1bf979136b77564c09b10bcf863f81be8a61

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