Skip to main content

This package contains the notify decorator, used to notify users when the wrapped function has finished execution.

Project description

Function Notifier

This simple package contains the notify decorator, used to notify users when the function it wraps has finished execution.

PyPI Version License

Installation

To install Function Notifier, navigate to a command-line with your Python environment set up (e.g. Anaconda Prompt) and enter,

$ pip install function_notifier

Dependencies

Note that plyer is also installed by pip for creating the notification messages themselves.

Usage

import time
from  function_notifier import notify


@notify()
def foo():

  time.sleep(60)

  return None


if __name__ == "__main__":
  foo()

The code above offers an example of how to use the Function Notifier package. The imported notify decorator is added to any function you suspect will take a while, which results in an operating system notification upon that function's completion. The time import here is only used to simulate a function with a long runtime.

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

function_notifier-1.0.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

function_notifier-1.0.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: function_notifier-1.0.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for function_notifier-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f0423ce0aa60bee17c53017be2d8561db08a898dd5260ca731059dc32667ce05
MD5 6c761cc30f9e4161933e8c50a38d4975
BLAKE2b-256 0d99522eb16e10ff1d351a483da323523ed7dc009a8bbe01e297fd0f1180604f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for function_notifier-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5884ad3eb1fea23051c99029c92ad886cf79680bdc3e7623a0973e2dab468ec4
MD5 b9f896a2c3430f60b4933231678f3f4d
BLAKE2b-256 649621db581f87044311bf3a25406866695dca988f78a697a0614151767369a1

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