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.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0423ce0aa60bee17c53017be2d8561db08a898dd5260ca731059dc32667ce05 |
|
MD5 | 6c761cc30f9e4161933e8c50a38d4975 |
|
BLAKE2b-256 | 0d99522eb16e10ff1d351a483da323523ed7dc009a8bbe01e297fd0f1180604f |
File details
Details for the file function_notifier-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: function_notifier-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5884ad3eb1fea23051c99029c92ad886cf79680bdc3e7623a0973e2dab468ec4 |
|
MD5 | b9f896a2c3430f60b4933231678f3f4d |
|
BLAKE2b-256 | 649621db581f87044311bf3a25406866695dca988f78a697a0614151767369a1 |